fix(updater): verify checksums.txt SLSA provenance via gh attestation (PILOT-76)#5
Merged
Merged
Conversation
The release workflow now attests checksums.txt via actions/attest-build-provenance@v2 (PILOT-120, PR #166). This commit adds consumer-side verification: after downloading checksums.txt, the updater now runs 'gh attestation verify' to confirm the file was produced by the trusted CI workflow. Graceful skip when gh CLI is not on PATH (operator directive: not every environment has it). Config.SkipAttestation allows tests to bypass without requiring real GitHub attestations. Closes PILOT-76 (consumer-side, updater half).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
hank-pilot
approved these changes
May 29, 2026
Contributor
hank-pilot
left a comment
There was a problem hiding this comment.
Approving updater SLSA verify.
Collaborator
Author
|
Status (auto-generated)
Both PILOT-76 PRs (updater#5 + pilotprotocol#167) are now merged. Jira cleanup pending. |
Collaborator
Author
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.
What
The release workflow now attests
checksums.txtviaactions/attest-build-provenance@v2(PILOT-120, PR #166). This PR adds consumer-side verification: after downloading checksums.txt, the updater runsgh attestation verifyto confirm provenance before trusting the checksums to validate the tarball.Why
An attacker with GitHub write access could publish a matched fake binary + fake checksums.txt. The existing SHA-256 check passes because the attacker controls both sides. SLSA attestation closes this gap — the attestation proves checksums.txt was produced by the trusted release workflow, not an attacker.
What changed
verifyChecksumsAttestationmethod + backing function variableghCLI not on PATH (operator directive)Config.SkipAttestationflag for test environmentsTestMainoverrides the global fn so existing tests pass without real GitHub attestationsVerification
go build ./...✓go vet ./...✓go test ./... -count=1✓ (all 50+ tests pass in 0.456s)Closes PILOT-76 (updater half — install.sh half is a separate PR on TeoSlayer/pilotprotocol).