ci: attest builds and attach provenance - #741
Merged
Merged
Conversation
Generates a signed SLSA provenance attestation for the pushed image and stores it both in the registry and on the GitHub release. BuildKit already emitted provenance and an SBOM, but those are registry-side only. Anyone verifying a release from GitHub had no signed artifact to check against, and neither did Scorecard. The upload waits for release.yml, which is triggered by the same tag push but runs independently, so the ordering is not assumed.
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.
Summary
Produces a signed provenance attestation for each released image and puts it somewhere a user can actually reach it.
Closes #737
Changes
docker.yml: addactions/attest-build-provenanceagainst the pushed image digest, withpush-to-registry: true.docker.yml: attach the Sigstore bundle to the GitHub release ashoundarr-<tag>.sigstore.json.docker.yml: thebuildjob gainsid-token,attestations, andcontents: writefor the upload.BuildKit already emitted
provenance: mode=maxand an SBOM, but those are registry-side only, so anyone verifying a release from GitHub had nothing to check against. Releases previously carried no assets at all.release.ymlis triggered by the same tag push but runs independently, so the upload waits for the release rather than assuming it beats a multi-arch build.Testing
actionlintclean. New steps are gated onstartsWith(github.ref, refs/tags/v), so PR builds are untouched; this PR exercises that path by not running them. Shell inputs are passed throughenv:rather than inline expressions.Worth noting: the
buildjob now holdscontents: write. It is job-level rather than top-level, the steps using it are tag-gated, and a fork PR token is read-only regardless.Type of Change
ci:)Checklist
Closes #Ntype:*and onepriority:*labelphase:*label (or none when not roadmap work)