Repository navigation
ci(release): generate provenance in an isolated reusable workflow (SLSA L3) - #16
Merged
Merged
Conversation
…SA L3) Move the binary and image provenance attestations out of the build jobs into a new reusable workflow (.github/workflows/attest.yml). A reusable workflow runs in its own execution context with its own OIDC identity, so the signing material is unreachable by the build's user-defined steps — that isolation is the SLSA Build L3 requirement (in-job attestation is only L2). Provenance still lands on GitHub's attestation API, so `gh attestation verify` keeps working; the signer-workflow is now attest.yml. release.yml: binary-release-assets uploads checksums.txt as an artifact (drops its in-job attest + id-token/attestations perms); new attest-binaries and attest-image jobs call attest.yml. container-image-release keeps keyless cosign + the syft SBOM attestation in-job (separate controls) and drops the in-job provenance attest. The ghd signer ripple is repointed: ghd.toml signer_workflow, stage_ghd_release_assets expected_signer (+ its test), and the inspection-summary `gh attestation verify --signer-workflow` all move release.yml → attest.yml (cosign's certificate-identity stays release.yml — the cosign signer is unchanged). The three tag-only-path fixes from the sibling's release shakeout are baked in from the start: the shared attest job declares packages:write so every caller (incl. the binary one) must grant it; apko publish runs `mkdir -p sbom` first (PR2); and attest.yml carries its OWN docker/login-action because the build job's GHCR login does not cross the reusable-workflow boundary. Verified: actionlint clean on release.yml + attest.yml; stage_ghd test green (6/6, now asserting the attest.yml signer); `moon run root:check` green (12 tasks). The tag-only publish→cosign→attest path is exercised by the throwaway-tag rehearsal. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
PR 3 of 3 reproducing
template-go-api's session-015 migration. Moves binary + image provenance attestation out of the build jobs into a new reusable workflow (.github/workflows/attest.yml). A reusable workflow has its own isolated OIDC identity, so the signing key is unreachable by the build's user-defined steps — that isolation is SLSA Build L3 (in-job attestation is only L2). Provenance still lands on GitHub's attestation API, sogh attestation verifykeeps working; the signer-workflow is nowattest.yml.Changes
attest.yml(workflow_call):actions/attestfor binary checksums +actions/attest-build-provenancefor the image.release.yml:binary-release-assetsuploadschecksums.txtas an artifact (drops in-job attest +id-token/attestationsperms); newattest-binaries/attest-imagejobs callattest.yml.container-image-releasekeeps keyless cosign + the syft SBOM attestation in-job and drops the in-job provenance attest.attest.yml:ghd.tomlsigner_workflow,stage_ghd_release_assets.pyexpected_signer(+ its test), and the inspection-summarygh attestation verify --signer-workflow. cosign'scertificate-identitystaysrelease.yml(the cosign signer is unchanged).The three tag-only-path fixes, baked in from the start
These are the bugs the sibling's forced release shook out (the dry-run can't reach this path):
attestjob declarespackages: write, so every caller — including the binary one — must grant it (a reusable workflow can't request more than its caller grants).apko publish --sbom-pathneeds the dir to pre-exist →mkdir -p sbom(landed in PR2).attest.ymlcarries its owndocker/login-action— the build job's GHCR login doesn't cross the reusable-workflow boundary.Validation
release.yml+attest.yml;stage_ghdtest green (6/6, now asserting theattest.ymlsigner);moon run root:checkgreen (12 tasks).🤖 Generated with Claude Code