verify-action-build: credit in-tree binaries the rebuild reproduces - #1206
Open
potiuk wants to merge 1 commit into
Open
verify-action-build: credit in-tree binaries the rebuild reproduces#1206potiuk wants to merge 1 commit into
potiuk wants to merge 1 commit into
Conversation
The in-tree binary check only knew how to verify a binary against GitHub release provenance - a SLSA attestation or a SHA256SUMS asset. A bundler- copied dependency asset has neither and never will: 1Password/load-secrets- action's dist/core_bg.wasm is ncc output copied from @1password/sdk-core, pinned by sha512 integrity in package-lock.json, so PR apache#1195 hard-failed on a binary whose provenance chain is npm's rather than the action's. Delete those binaries from the output directory before the rebuild, as the minified JS already is, and credit any that come back byte-identical. That is the same guarantee the JS rebuild check gives. A fully-reproduced action now skips the release lookups entirely; everything else is unchanged. Generated-by: Claude Code (Opus 5)
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.
Code change
Summary
The in-tree binary check could only verify a binary against GitHub release provenance - a SLSA attestation or a
SHA256SUMSasset. A binary a bundler copied intodist/out of a dependency has neither and never will, so the check rejected build output.Surfaced by #1195 (
1Password/load-secrets-actionv5.0.1). Itsdist/core_bg.wasmisnccoutput copied from@1password/sdk-core@0.5.0, whichpackage-lock.jsonpins with a sha512 integrity hash - the provenance chain exists, it is just npm's rather than the action's. (Upstream 1Password/load-secrets-action#186 asks them to publish attestations; this makes us able to verify it either way.).wasm,.node,.so,.dll,.dylib,.exe) from the output directory before the rebuild, exactly as the minified JS already is (build_action.Dockerfile).security.py,verification.py).SHA256SUMSlookups entirely.Binaries the rebuild does not reproduce - a committed launcher like
runs-on/action'smain-linux-amd64- are unaffected and still require attestation orSHA256SUMS.Type of change
Testing
uv run pytest utils/tests/- 332 passed.analyze_in_tree_binariestests: a reproduced binary passes without any release lookup being attempted, an unreproduced one still fails, and the credit does not leak to a sibling launcher binary.verifyjob on this PR exercises it.Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting