Repository navigation
Attest release builds and pin examples to releases - #15
Merged
Merged
Conversation
The release workflow now attaches a build provenance attestation (actions/attest-build-provenance, pinned by SHA) to every file the release attaches and to the container image, pushed with the image. id-token and attestations write are granted to the release job only; the workflow itself has no permissions. The workflow runs only for release tags (v1.2.3), so pushing a major tag such as v0 can never create a release for it. The image is pushed and attested before the release is published, and gh publishes the release only after every asset is uploaded, which immutable releases require. The major tag stays a plain moving tag with no release. The README and install.sh name release tags instead of main. The README shows how to check a release with gh attestation verify. The action, pinned to a major tag or a commit SHA, now installs the release at that commit (scripts/action-release.sh over git ls-remote). Before, a SHA pin installed the latest release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The image is pushed by digest, attested, and only then tagged :vX.Y.Z and :latest with docker buildx imagetools create. A failed attestation now leaves no tag naming an unattested image. The step checks that both tags resolve to the attested digest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uses: ./ runs with no action ref, so CI never exercised scripts/action-release.sh. scripts/test-action-release.sh feeds it a fixed tag listing (a major tag, an annotated tag's commit, a tag object, a branch name, v0.10.0 over v0.9.0, a major tag with no release of its own) under every awk on the runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a commit SHA or major-tag pin, a failed git ls-remote used to read as no match and install the latest release with a warning. It now fails the step (exit 2). The fallback to the latest release stays for a listing that succeeded with no match, and for refs such as a branch name that need no lookup. Co-Authored-By: Claude Opus 5.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.
Every release now carries a build provenance attestation for each file attached to the release and for the container image. Check one with
gh attestation verify <file> --repo DefectDojo/earlylight. The README has the full command, including--signer-workflowand--source-ref, and the form foroci://ghcr.io/defectdojo/earlylight:<tag>.Release workflow
dist/*(binaries,checksums.txtand its signature bundle, licenses,detectors.json) and the image digest withactions/attest-build-provenance, pinned by SHA. The image attestation is pushed to GHCR.id-token: writeandattestations: writeare granted to the release job only. The workflow itself has no permissions.:vX.Y.Zand:latest. The step checks that both tags name the attested digest.v1.2.3), so pushing a major tag such asv0never creates a release.gh release createpublishes only after every asset is uploaded.v0) stays a plain tag with no release and moves after each release.Action
Docs
install.shname release tags instead ofmain. The action example is pinned to a release.Admin step after merge (Settings → General → Releases)
v0,v1): the release workflow moves them with each release. Scope any tag ruleset tov*.*.*.Checked on the first release: the workflow run, both attestations, the image tags, and
gh attestation verifyfor a binary and for the image.🤖 Generated with Claude Code