fix(release): migrate cosign signing to the Sigstore bundle format - #459
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
The
Releaseworkflow fails at the cosign signing step, blocking releases and the fleet gate.cosign-installer@v4.1.2installs cosign v3.0.6, which defaults--new-bundle-formatto true. In that mode cosign ignores--output-signature/--output-certificateand instead writes a single bundle file, so the goreleasersignsblock (which passed only the two--output-*flags and no--bundle) tried to create a bundle at an empty path and failed:Fix
Migrate the cosign
sign-blobinvocation to the Sigstore bundle format: pass--bundle=${signature}, drop the two--output-*flags, and produce a singlechecksums.txt.bundleartifact (it packages both the signature and the signing certificate). The GPG signing block is unchanged.docs/release-verification.mdis updated to download and verify the.bundlewithcosign verify-blob --bundle=checksums.txt.bundle.The minimal alternative (adding
--new-bundle-format=falseto keep the separate.sig/.pemoutputs) was tried first and rejected: cosign v3.0.6 no longer supports the legacy output-only mode and errors withmust provide --new-bundle-format or --bundle.Verification
Reproduced locally against the exact cosign the installer pins (
go install github.com/sigstore/cosign/v3/cmd/cosign@v3.0.6, confirmedGitVersion: v3.0.6):cosign sign-blob --helpshows--new-bundle-format=trueis the default, matching the failure.--output-certificate=... --output-signature=... <file> --yes) prints the deprecation warnings from the failure log and would write the bundle to an empty path.--new-bundle-format=false --output-signature=... <file> --yesfails withmust provide --new-bundle-format or --bundle where applicable, confirming the legacy path is gone.sign-blob --bundle=checksums.txt.bundle <file> --yesparses cleanly and proceeds to ephemeral key generation and the OIDC device flow with no deprecation warnings (it only stops at the interactive OIDC step, which requires a real GitHub Actions token).goreleaser checkpasses on the edited.goreleaser.yaml.Full end-to-end keyless signing is exercised by the
Releaseworkflow on the next rc tag.