Skip to content

fix: embed Codecov PGP public key instead of fetching from Keybase#73

Merged
jason-ford-codecov merged 1 commit into
mainfrom
th/wrapper-embed-pgp-key
Jun 7, 2026
Merged

fix: embed Codecov PGP public key instead of fetching from Keybase#73
jason-ford-codecov merged 1 commit into
mainfrom
th/wrapper-embed-pgp-key

Conversation

@thomasrockhu-codecov
Copy link
Copy Markdown
Collaborator

Summary

  • Incident fix. https://keybase.io/codecovsecurity/pgp_keys.asc now returns the literal string SELF-SIGNED PUBLIC KEY NOT FOUND instead of the public key. That string was being piped into gpg --import, so gpg --verify of the CLI's SHA256SUM failed for every user running codecov.sh.
  • Embed the armored Codecov Uploader public key (fingerprint 2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869) directly in scripts/validate.sh and the released dist/codecov.sh, removing the runtime dependency on Keybase.
  • Teach package.py to preserve the embedded PGP block verbatim during the build (it otherwise strips the required blank line and rewrites CODECOVCC, which would corrupt the key on the next rebuild).

Notes

  • dist/codecov.sh was edited minimally rather than regenerated, to avoid pulling in unrelated unreleased scripts/ changes during the incident.
  • The embedded key is byte-identical to what Keybase previously served (checksum =ch7z).

Test plan

  • Embedded key imports cleanly: gpg --no-default-keyring --importkey 806BB28AED779869 ... imported, exit 0, no armor warnings.
  • python package.py reproduces an identical, clean-importing PGP block from source.
  • No keybase references remain in scripts/validate.sh or dist/codecov.sh.
  • Bump CODECOV_WRAPPER_VERSION and run make deploy to release (follow-up).

Made with Cursor

The Keybase endpoint https://keybase.io/codecovsecurity/pgp_keys.asc now
returns "SELF-SIGNED PUBLIC KEY NOT FOUND" instead of the key, which was
piped into gpg --import and broke CLI signature verification for everyone.

Embed the armored Codecov Uploader public key directly in validate.sh and
the built codecov.sh so verification no longer depends on Keybase, and
teach package.py to preserve the PGP block verbatim during the build.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jason-ford-codecov jason-ford-codecov merged commit 5cb9a8b into main Jun 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants