Skip to content

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

Done

Description

@thiras

Found by Copilot's review of #2396 (thread).

Gap

sign-release.sh checks that the local tag matches origin's and that the tag signature verifies. It then signs whatever archives the draft holds. Nothing ties those archives to the commit the tag names when signing happens.

Each release run is self-consistent. actions/checkout refuses a tag that has moved off github.sha, and build-binaries and docker pin github.sha, so every job verifies and builds one commit. The gap opens after the run finishes:

  1. vX → A. The run builds A and fills the draft.
  2. A maintainer force-pushes a signed vX → B. This queues a new run.
  3. Before that run replaces the assets, the maintainer runs sign-release.sh vX. The local and remote tags agree (B), and B's signature verifies.
  4. The script signs SHA256SUMS over A's archives, published as vX = B.

This needs a maintainer to re-push their own signed tag and then sign during the race window. It is not an outside attack, but the signature then vouches for the wrong commit.

Proposed fix

  • upload-assets attaches source-commit.txt containing $GITHUB_SHA.
  • sign-release.sh refuses unless that file equals git rev-parse "refs/tags/$TAG^{commit}", then signs it alongside SHA256SUMS. This makes the commit binding part of the signed provenance.
  • Add cases to the sign-release test harness: a mismatched commit, and a missing file.
  • Optionally cross-check the image's org.opencontainers.image.revision label against the same commit.

🤖 Generated with Claude Code

Activity

  1. added
    github_actions
    on Oct 9, 2026
  2. self-assigned this
    on Oct 9, 2026
  3. removed their assignment
    on Oct 9, 2026
  4. added
    area:ci
    on Oct 21, 2026
  5. moved this from Backlog to In progress in deCDNon Nov 26, 2026
  6. moved this from In progress to Done in deCDNon Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cigithub_actions

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions