Repository navigation
ci(publish): cosign-verify every child manifest, not just the index (#925) - #982
Merged
Merged
Conversation
…925) publish.yaml signs with `cosign sign --recursive` (index + each per-arch manifest), but `cosign verify` has no --recursive, so the verify step checked the eight index digests and left the sixteen per-arch manifests -- what a node actually pulls -- signed and never checked. - scripts/ghcr-lib.sh: ghcr_index_children walks an index's .manifests[] from the registry (curl + python3, like the rest of the lib). Every entry is returned (buildx attestation manifests are held to the same bar); a non-index, an empty list or a malformed digest is a failure, never an empty success. - scripts/verify-image-signatures.sh: cosign-verifies each index ref AND every child with the publish.yaml identity/issuer; checks everything before failing so one run names every unsigned manifest; exit 2 on a walk that yields nothing. - publish.yaml: the verify step now runs that script over signed-images.txt. - publish-verify: the registry sweep checks a signature tag (exactly one layout) for every child too, and a new cosign pass (same pinned installer, v4.1.2 -> cosign v3.0.6) verifies every resolved index + child. Unverified manifests feed the rolling issue. - scripts/check-index-children.sh (+ ci step): hermetic cases for the walk, including the zero-children case that would make the gate vacuous. - runbook: a cosign v3 section (bundle vs legacy layout, no --recursive, how to verify children by hand, what this pipeline does not sign). Closes #925 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
…deQL actions/untrusted-checkout); runbook merged with #982's cosign section Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
…run (#930) (#983) * fix(publish-verify): demonstrate the gate's red state in CI on every run (#930) The artifact gate's only demonstrated red was a real defect (1e31e3a, #929) that aged out of the sweep window with nothing fixed, leaving a gate whose failure path was asserted rather than shown (#853). - scripts/publish-verify-control.sh: the expected-red control. Builds a commit with `git commit-tree` on origin/main's tree (fixed identity and dates, so deterministic per base; never pushed, no ref), runs the verifier on it and asserts it goes red for the right reason: exit exactly 1, 20 MISSING lines all naming that sha, no `ok` line, 12 non-empty tag scans, and the `FAIL: 20 of 20` summary. Verifier exit 2 is inconclusive (2). A constructed commit never ages out; a pinned one (ef44437, 1e31e3a) does. - publish-verify.yaml: the control runs before the gate on every trigger, in its own step; the gate runs regardless of the control's outcome; a failed control files its own rolling issue, separate from "artifacts missing". - scripts/check-publish-verify-control.sh (ci.yaml `shell` job, no network): drives the REAL verifier against a fake registry (#930 option 1) and shows the control rejects a verifier that stopped counting MISSING, empty tag listings, a MISSING line for another commit, a stray `ok`, and a perfect red with exit 0; accepts a correct red; reports exit 2 as inconclusive. - docs/runbook.md: publish-verify paragraph. Closes #930 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * publish-verify: check out main explicitly in the workflow_run job (CodeQL actions/untrusted-checkout); runbook merged with #982's cosign section Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Closes #925
The gap
publish.yamlsigns withcosign sign --recursive(the index and each per-arch child), but records one index digest per repo insigned-images.txt, andcosign verifyhas no--recursive(v2.4.1 and v3.0.6 both lack it). So the verify step checked 8 index signatures and never looked at the 16 per-arch manifests, which are what a node actually pulls.Fix
ghcr_index_childreninscripts/ghcr-lib.shdoes a GET on/v2/<repo>/manifests/<index digest>(OCI index / Docker manifest-list Accept) and parses.manifests[].digestwith python3, the same way the rest of the lib parses JSON. The runner does not need crane or oras. Every entry is returned; buildxunknown/unknownattestations would be checked too rather than filtered out. A non-index, an empty list or a malformed digest is a failure, not an empty success.scripts/verify-image-signatures.shrunscosign verifyon each index ref and on every child, using the same identity regexp and issuer as before. It checks everything before it fails, so a single run names every bad manifest. Exit codes: 1 = something did not verify, 2 = could not check (including a walk that found no children).publish.yaml: the verify step now runs that script oversigned-images.txt.publish-verifygets two changes:verify-published-artifacts.sh) now requires a signature tag, in exactly one layout, for every child as well as the index. That is 36 coordinates per commit, up from 20.scripts/check-index-children.shplus a CI step: 7 hermetic cases for the walk. I mutation-tested it: letting an emptymanifestslist through turns the check red (FAIL index with zero children: accepted, printed [], exit 1).--recursive, how to verify children by hand, and which images this pipeline does not sign.Local verification (read-only, cosign v3.0.6 checksum-verified from the release)
Current
main(1ad4b6a), all 8 images:PASS: 24 manifest(s) verified (8 index(es) + their children), exit 0. Every index has 2 children (linux/amd64, linux/arm64/v8), all cosign-3 bundle layout. Sweep:PASS: 36 artifact(s) present.Seen-red
sha256:a1e4327e…with a stand-inCOSIGNthat passes the index through to real cosign and reports "no signatures found" for any other digest. Result:verified index …,FAILED child …5d23c6b2…,FAILED child …f0495af5…, exit 1. The old verify step would have passed this.7c606eb2…, children058ebb13…and5473fad3…. Also the pinnedaether-proxy938c5a57…, childrenbb53bed6…and4a90a7fb…. Real cosign reports each childFAILED … no signatures found, exit 1.proxy-release.yml, the index and both children fail withno matching attestations, exit 1.could not enumerate the child manifests).verify-published-artifacts.sh 6ac9a6cgivesMISSING … signature for child …for every child,FAIL: 24 of 36, exit 1.Found along the way (not fixed here)
ghcr.io/bpalermo/aether/aether-proxyis not signed at all: 0 signature tags in the repo, and neither the pinned index nor its children verify.proxy-release.ymlhas no signing step, and the repo is not inGHCR_IMAGE_REPOS. This deserves its own issue.Not run
Lint:
bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //scripts/...is green,scripts/check-shell-lint.shcovers 28/28 scripts, andscripts/check-signature-layout.shpasses 5/5.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr