Skip to content

ci(release): bind signed assets to the tagged commit - #3017

Merged
alpergundogdu merged 1 commit into
mainfrom
claude/2397-release-source-commit-4d59c6
Nov 27, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
claude/2397-release-source-commit-4d59c6

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #2397

What

  • release.yml upload-assets writes source-commit.txt ($GITHUB_SHA) next to SHA256SUMS and uploads it to the draft.
  • sign-release.sh adds source-commit.txt to the GPG sign targets. After download it refuses unless the file is one line equal to git rev-parse "refs/tags/$TAG^{commit}". A tag moved after its run filled the draft now stops the script before anything is signed.
  • check-release-signed.sh (publish-crates) takes the tag's commit as a third argument. It verifies source-commit.txt.asc against KEYS with the same live-key rules as SHA256SUMS.asc, and checks that the file names that commit. publish-crates.yml passes steps.signature.outputs.sha.
  • SECURITY.md (signature count, a verify step for the commit file) and RELEASING.md are updated to match.

The optional image org.opencontainers.image.revision cross-check is left out: it needs a registry round trip per image and adds nothing the signed commit file does not already bind.

Tests

  • scripts/tests/test_sign_release_publish.py: the shim stages source-commit.txt; new cases cover a draft built from another commit, a missing file, and a two-line file. All of them refuse before signing or uploading. The happy path asserts source-commit.txt.asc is uploaded.
  • .github/scripts/tests/test_check_release_signed.py: missing file/signature, commit mismatch, tampered file, two-line file.
  • shellcheck is clean on both scripts, and pre-commit run --files passes.
  • Three local failures also fail on main in this environment: the macOS /private/var path, local sha256sum --strict on a blank line, and git-cliff. They are not caused by this change.

🤖 Generated with Claude Code

upload-assets attaches source-commit.txt with $GITHUB_SHA. sign-release.sh
refuses unless it equals the commit the tag names, then GPG-signs it with
SHA256SUMS, so a tag moved after its run filled the draft cannot get the
old commit's assets signed under it. check-release-signed.sh verifies
source-commit.txt.asc and that the file names the tag's commit before
publish-crates uploads anything.

Closes #2397

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alpergundogdu
alpergundogdu merged commit a84dac6 into main Nov 27, 2026
32 checks passed
@alpergundogdu
alpergundogdu deleted the claude/2397-release-source-commit-4d59c6 branch November 27, 2026 10:03
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.

ci(release): bind draft assets to the tagged commit at signing time

1 participant