You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/08/26 07:34:37 UTC
[PR] Fixes #9061. Verify release signatures before publishing checksums [camel-quarkus]
oscerd opened a new pull request, #9064:
URL: https://github.com/apache/camel-quarkus/pull/9064
Fixes #9061.
`release-utils/scripts/upload-source.sh` downloaded each artifact together with its detached signature, then generated the `.sha512` files that get published directly from those downloads and `svn import`ed the directory to `dist.apache.org/repos/dist/dev`. `gpg --verify` was never invoked, so the `.asc` files were copied along unchecked and the published checksums described whatever had been downloaded rather than something verified.
**Changes**
- Import the in-repo `KEYS` into a throwaway `--homedir` (via `mktemp -d`, removed by an `EXIT` trap) so verification is answered by the project release keys rather than by whatever is in the release manager's own keyring.
- Add a `fetch_verify_checksum` helper that downloads the artifact and its `.asc`, verifies the signature, and only then writes the `.sha512`. This collapses the three near-identical blocks into three calls.
- Drop `-k` from the staging probe. Only a status code is consumed there so the impact was minimal, but disabling certificate validation bought nothing.
`set -e` is already in force, so a failed verification aborts the release rather than publishing an unverified artifact.
**Verification**
- `bash -n` passes.
- `KEYS` imports cleanly into a throwaway keyring (25 public keys).
- `gpg --verify` against a bogus signature exits non-zero, confirming `set -e` will abort.
- The `location` used to resolve `KEYS` is captured before the script `cd`s into the version directory, so the relative path still resolves.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes #9061. Verify release signatures before publishing checksums [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton merged PR #9064:
URL: https://github.com/apache/camel-quarkus/pull/9064
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fixes #9061. Verify release signatures before publishing checksums [camel-quarkus]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #9064:
URL: https://github.com/apache/camel-quarkus/pull/9064#issuecomment-5494529153
Thanks @jamesnetherton — both notes are right, and the second one reproduces exactly as you described.
**Leftover `${version}/` — fixed.** I stubbed out `curl`/`wget`/`gpg`/`svn` and forced the verification to fail on the *second* artifact, i.e. after the script has already `cd`'d into the staging directory. Against the previous revision the directory is left behind and the re-run dies at `mkdir` with `File exists`; with this change it is cleared and the re-run gets past `mkdir`. The trap now covers `stagingDir` as well as `gpgHome`, captured as an absolute path before the `cd` so it still resolves from inside the directory it is removing. The explicit `rm -rf ${version}/` at the end is gone, since the trap covers the success path too.
**Revoked and expired keys — documented, not enforced.** You are right that `gpg --verify` exits 0 for both and only warns, and that `KEYS` holds expired keys by design because ASF keeps whatever signed past releases. So the realistic gap really is an RM whose key lapsed mid-cycle rather than a forged signature. I have taken the option you offered and put a note above `fetch_verify_checksum` recording the gap and naming the fix (`--status-fd 1`, reject `EXPKEYSIG`/`REVKEYSIG`), rather than folding the enforcement into this PR — it changes which releases pass, so it seemed better as its own change. Happy to do it here instead if you would rather.
Also confirmed your reading of the three `fetch_verify_checksum` call sites: they expand to the same URLs and filenames as the blocks they replaced.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org