🔒 fix(release): pin cosign signer identity on the maintainer verify path (AUD2-F01) - #83
Merged
Conversation
…ath (AUD2-F01) `verify_cosign()` in hack/release/verify-artifacts.sh ran the byte-identical unpinned `cosign verify-blob --bundle "$bundle" "$archive"` that AUD2-S03 had just fixed in hack/install.sh. Keyless verification without a signer pin either errors out on cosign v2 or accepts ANY Fulcio identity, so a mirror-swapped archive shipped with its own validly signed bundle verified clean on the path `task release-verify` uses to check a release before it ships — and `--require-signature` promised something it did not deliver there. The call now carries the D-153 pair, byte-identical to SECURITY.md and hack/install.sh: --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp '^https://github\.com/PlatformRelay/[Aa]ssent/' Enforcement extends the EXISTING drift gate rather than starting a second published truth (D-128): hack/release/install_cosign_pin_test.sh now grades verify-artifacts.sh as the THIRD file, requiring exactly one distinct value per file and all three pairwise-equal. No new `task check` stage — the gate is already wired as release-install-cosign-pin-test, so CHECK_STAGES stays at 19. Non-vacuity, which is the hard part here: verify-artifacts.sh only reaches cosign when a .sigstore.json sits beside an archive, and the snapshot path ships no bundles, so an end-to-end test can pass green without ever executing the changed line. The discriminator is therefore the stubbed cosign's argv LOG, not the exit code — §5d requires that log to be non-empty and to carry both pinned values, and §5e is the paired control showing a bundle-less (snapshot-shaped) dist/ leaves the same log empty. Offline throughout: stubbed cosign, no network. Proved red by mutation, each on a temp copy: each flag deleted from verify-artifacts.sh; the pre-fix both-flags-missing shape; either field drifted from the other two files; the file disagreeing with itself; the pre-existing install.sh flag and drift mutations re-run unweakened; and the trap case — both flags left textually in place while the cosign branch is never entered, which §5d catches on the empty stub log.
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.
AUD2-F01 — SEC-03's twin on the maintainer/CI path
verify_cosign()inhack/release/verify-artifacts.shran the byte-identical unpinnedcosign verify-blob --bundle "$bundle" "$archive"that AUD2-S03 had just fixed inhack/install.sh. Keyless verification without a signer pin either errors out on cosign v2 or accepts ANY Fulcio identity, so a mirror-swapped archive shipped with its own validly signed bundle verified clean on the pathtask release-verifyuses — and--require-signaturepromised something it did not deliver there.The fix
The call now carries the D-153 pair, byte-identical to
SECURITY.mdandhack/install.sh:Enforcement extends the existing drift gate rather than starting a second published truth (D-128):
hack/release/install_cosign_pin_test.shnow gradesverify-artifacts.shas the third file, requiring exactly one distinct value per file and all three pairwise-equal. No newtask checkstage — the gate is already wired asrelease-install-cosign-pin-test, soCHECK_STAGESstays at 19.Non-vacuity
verify-artifacts.shonly reaches cosign when a.sigstore.jsonsits beside an archive, and the snapshot path ships no bundles — so an end-to-end test can pass green without ever executing the changed line. The discriminator is therefore the stubbed cosign's argv log, not the exit code: §5d requires that log to be non-empty and to carry both pinned values, and §5e is the paired control showing a bundle-less (snapshot-shaped)dist/leaves the same log empty.Gates
task check— exit 0, all 19 stagesbash hack/release/install_cosign_pin_test.sh— exit 0 standalonehack/audit/exitgate_test.shuntouched