Repository navigation
fix(ci): tolerate a Rekor 409, and check pins even on a partial build - #90
Merged
Merged
Conversation
Two faults, one cause, found because #86's build went red on both at once. A rebuild whose inputs have not changed produces a byte-identical digest, and Rekor rejects a second equivalent entry for it with 409 createLogEntryConflict. That is not a signing failure: the entry it conflicts with IS this digest's signature, already in the log from the earlier run. toolbox/gha was untouched by #86, gha-toolbox rebuilt to the same bytes, and the sign step failed. The sign step now matches createLogEntryConflict specifically and treats it as already-signed, with a notice explaining why. Any other cosign failure still fails: verified against four stubbed outcomes, where success and the 409 exit 0, and a missing OIDC token and a registry 403 both exit 1. The second fault is worse, and the 409 is what exposed it. A red domain arm skipped the pins job entirely, because needs: [base, domain] will not run on a partial build. So a reproducible rebuild could silence the very check added in #88 to watch the pins, while five images published with nobody comparing anything. It now runs with if: !cancelled(). That raises the question the first version did not have to answer: what to do about an image that never published. Nothing to compare, so it is reported as "published no digest in this run, so its pin was NOT checked" rather than dropped. Four greens must not read as a clean sweep when six images were expected. Verified on a simulated partial build: the four that published are confirmed current, and the two that did not are named as unchecked. The zero-digest case still fails outright rather than warning. On a totally failed build that is redundant with the build's own red, but the alternative is a job that reports success having compared nothing, which is the failure shape that let the pins drift unnoticed four times in the first place. actionlint clean, zizmor clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
Two faults with one cause, both visible in #86's build.
The 409
A rebuild whose inputs have not changed produces a byte-identical digest, and Rekor rejects a second equivalent entry for it:
That is not a signing failure. The entry it conflicts with is this digest's signature, already in the log from the earlier run.
toolbox/ghawas untouched by #86,gha-toolboxrebuilt to the same bytes, and the step failed on its own prior success.Matched on
createLogEntryConflictspecifically rather than on any non-zero exit, so a real failure still fails. Verified against four stubbed cosign outcomes:The worse one, which the 409 exposed
A red
domainarm skipped thepinsjob entirely, becauseneeds: [base, domain]does not run on a partial build. So a reproducible rebuild could silence the very check #88 added to watch the pins, while five images published with nobody comparing anything.It now runs with
if: ${{ !cancelled() }}.That raises a question the first version never had to answer: what about an image that never published? There is nothing to compare, so it is reported as "published no digest in this run, so its pin was NOT checked" rather than quietly dropped. Four greens must not read as a clean sweep when six images were expected.
Verified on a simulated partial build, with
gha-toolboxmissing:One deliberate roughness
The zero-digest case still fails outright rather than warning. On a totally failed build that is redundant with the build's own red. The alternative is a job that reports success having compared nothing, and that is the exact failure shape that let the pins drift unnoticed four times, so I would rather have the redundant red.
actionlintclean,zizmorclean.🤖 Generated with Claude Code