Repository navigation
release: sign the release keylessly with cosign, no key material and no secret - #501
Merged
Merged
Conversation
Nothing in the release path was signed. Per-asset .sha256 siblings are served from the same release as the assets they describe, so they detect a corrupt download and prove nothing about origin. publish now writes an aggregate checksums.txt over every artifact and signs it with 'cosign sign-blob --bundle' using the run's OIDC token. No secret, no key to rotate. Contrast the GPG path in package-linux, which warns and exits 0 when its secret is absent and therefore ships unsigned rpms. Strictly additive: every asset name and every .sha256 sibling is unchanged, because scripts/install.sh fetches those by exact name. The certificate identity is defined once in the job env and used by both the verify step and the release notes, so the documented command cannot drift from the one that is executed. cosign-installer is pinned to v4.1.2 rather than @v4: its floating majors stop at v3 and git/ref/tags/v4 is a 404, so @v4 would fail on a tag with the image already pushed.
Found by mutation, not by reading. Replacing the executed `cosign verify-blob` with `true` left TestTheSignatureIsVerifiedWhereItIsMade passing, because the step that prints the release notes documents the same command for users a dozen lines further down. The test was matching prose while the verification was gone. Both tests now cut the named step out of release.yml first, and the step name is a shared constant so a rename cannot narrow one of them to nothing. Re-verified: removing the executed call fails, and renaming the step fails both.
This was referenced Sep 15, 2026
golangci-lint's modernize analyzer blocks on changed code. Also adds the guard the index form silently lacked: an action reference with no ref at all would have panicked on Fields()[0] instead of reporting.
CHANGELOG.md conflicted with #500's entry: both added an Unreleased section at the same line. Resolved by keeping both, one `### Added` and one `### Fixed`, in Keep a Changelog order. No content dropped from either side. release.yml merged without conflict — #500 touched the job graph's `needs:`, this branch touched the publish job's steps and permissions.
scttfrdmn
enabled auto-merge (squash)
September 15, 2026 22:43
scttfrdmn
added a commit
that referenced
this pull request
Sep 15, 2026
CHANGELOG conflict only, and the two sides do not overlap: #500/#501 added ### Added and ### Fixed, this branch adds ### Changed and ### Removed. Resolved by keeping both in Keep a Changelog order (Added, Changed, Removed, Fixed). Verified the result is the exact union of both parents' Unreleased sections.
This was referenced Sep 16, 2026
scttfrdmn
added a commit
that referenced
this pull request
Sep 17, 2026
…ver existed (#523) The next release is 0.15.0, not the 0.16.0 the milestone was titled. Four lines in the Unreleased section described the CargoShip upload-path removal as having happened "in v0.15.0" — it shipped in 0.12.0 (#362, 2026-08-08) — and CLAUDE.md repeated the claim. A fifth said a tier defect was "the v0.15.0 defect"; that one was v0.10.1. No v0.15.0 tag, changelog section, or module-proxy entry has ever existed, so the number is free and skipping it would have preserved five wrong references to justify a milestone title. Promotes Unreleased to [0.15.0] - 2026-09-17: seekable compression framing end to end (#185, via #509/#513/#516) and the GoReleaser convergence (#502) with what it let us delete. Bumps the version constant, which is the authority the changelog link test and the packaging tests read. Also corrects the signing claims across four documents (#505). README.md, docs/index.md and docs-platform/guide/getting-started.md all said the project "does not sign releases yet"; #501 signs checksums.txt keylessly with cosign. Each now states the two positions separately, because neither covers the other: the release is signed, the .deb and .rpm files are not. The verify command is the one release.yml both runs and prints into the notes — a bundle, not the --certificate/--signature pair a first draft of this invented. README's claim that the apt/yum repository is "built and tested on every pull request" also went with #520, which deleted that machinery.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two answers, and only one of them is a defect.
The GPG key was never signing the release. It signs the rpm's embedded signature and the apt/yum repository metadata, and the repository half genuinely needs it — that is how
aptanddnfverify a repo, and there is no cosign substitute for it. That machinery is dormant and stays exactly as it is. lith doesn't do this because lith has no apt/yum repository.Nothing in the release path was signed at all. v0.14.0 published 18 assets: 9 artifacts and a
.sha256sibling for each. A hash file served from the same release as the asset it describes detects a corrupt download. It proves nothing whatsoever about origin — whoever can replace an asset can replace its hash file in the same motion, and a user following the published instructions would verify the tampered pair against itself and getOK.So this PR signs the release, keylessly, with no key material and no repository secret.
What it does
publishwrites an aggregatechecksums.txtover every published artifact and signs it withcosign sign-blob --bundle, exchanging the run's OIDC token for a short-lived Fulcio certificate. Two assets are added:checksums.txtsha256sumline per published artifactchecksums.txt.cosign.bundleChain of custody: bundle →
checksums.txt→ every asset.--bundlerather than--output-signature/--output-certificatebecause it carries the transparency-log inclusion proof too, so a user runs one offline command:No secret is created and no repository setting changes.
id-token: writeon thepublishjob is the entire requirement. That is the point, and not only for convenience: the existing GPG path inpackage-linuxwarns andexit 0s whenGPG_SIGNING_KEYis absent — which is why the rpms shipped so far are unsigned. A signing mechanism whose failure mode is silently unsigned is the one shape worse than none, because the absence is invisible. Keyless has nothing that can be missing.Strictly additive — the asset-name contract is untouched
Every existing asset keeps its name. Every per-asset
.sha256keeps its name, its format and its content, becausescripts/install.shfetches<asset>.sha256by exact name and is verified end to end against real releases including the wget-only path. The release notes now lead with the authenticated command and label the per-asset check as integrity-only, which is all it has ever been.Second defect fixed: publish could not tell a truncated artifact from a good one
The new step fails closed if any artifact is missing, if any
.sha256sibling is missing, or if a sibling andchecksums.txtdisagree about a digest. Publishing two hash sources that can disagree is worse than publishing one, because a user cannot tell which is lying. It also catches the duller version — an artifact that arrived truncated fromdownload-artifact, which nothing previously noticed.All five paths were exercised locally against fabricated assets: happy path, tampered sibling, missing sibling, missing artifact, tampered artifact. The four bad ones each exit non-zero with the right diagnosis.
Tests
internal/config/release_signing_test.go, six tests, each verified by mutation:id-token: writeTestPublishCanMintAnOIDCTokencosign verify-blobwithtrueTestTheSignatureIsVerifiedWhereItIsMade--certificate-identityTestTheCertificateIdentityHasOneDefinitionsecrets.COSIGN_KEYinto the stepTestTheSigningPathIsKeylesssha256sum "$pkg" > "$pkg.sha256"TestEveryAssetKeepsItsChecksumSiblingcosign-installer@v4TestCosignInstallerIsPinnedToAnExactVersionTwo of those are worth naming:
release.yml, andcosign verify-blobalso appears a dozen lines further down inside the release-notesechoblock, as documentation for users. So with the executed call replaced bytrue, the test happily matched the prose. Both tests now cut the named step out first, and the name is a shared constant so a rename cannot silently narrow one of them to nothing.cosign-installer@v4does not resolve. Its floating majors stop atv3—git/ref/tags/v4is a 404 whilev4.1.2resolves. Measured against the API, not assumed. A bare@v4would have failed on a tag, after the artifacts existed and the image had been pushed.What is not here: goreleaser
Evaluated empirically — goreleaser 2.18.1 installed, candidate config written,
goreleaser checkandgoreleaser release --snapshotactually run. It does not hold up as one PR right now, and the reason is measured rather than argued. Deferred to a tracking issue with the findings, including the parts that do work (the exact 5-tarball naming, theobjectfs-linux-armv7inner binary nameinstall.shhard-requires, and per-asset.sha256viachecksum.split).The headline blocker:
goreleaser checkfails withfield key_id not found in type config.NFPMRPMSignature, and the schema confirms it acceptskey_fileonly. nfpm's rpm signing needs the 16-hexkey_id. That is a correctness regression in signing, which per this project's own rule must fail closed rather than degrade quietly.Unverifiable until a tag
The signing step cannot execute on a PR —
publishruns only on a tag. Everything checkable without one has been checked: the shell logic against fabricated assets, the identity string against the OIDC claim format, the action ref against the GitHub API, and the workflow against the six tests. The first real proof is the next release, and if it fails it fails beforegh release create, so a broken signature cannot become a published one.