Skip to content

ci(release): generate provenance in an isolated reusable workflow (SLSA L3) - #16

Merged
jmgilman merged 1 commit into
masterfrom
ci/slsa-l3-provenance
Jun 28, 2026
Merged

jmgilman merged 1 commit into
masterfrom
ci/slsa-l3-provenance

Conversation

@jmgilman

Copy link
Copy Markdown
Contributor

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, so gh attestation verify keeps working; the signer-workflow is now attest.yml.

Changes

  • New attest.yml (workflow_call): actions/attest for binary checksums + actions/attest-build-provenance for the image.
  • release.yml: binary-release-assets uploads checksums.txt as an artifact (drops in-job attest + id-token/attestations perms); new attest-binaries / attest-image jobs call attest.yml. container-image-release keeps keyless cosign + the syft SBOM attestation in-job and drops the in-job provenance attest.
  • ghd signer ripple → attest.yml: ghd.toml signer_workflow, stage_ghd_release_assets.py expected_signer (+ its test), and the inspection-summary gh attestation verify --signer-workflow. cosign's certificate-identity stays release.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):

  1. The shared attest job declares packages: write, so every caller — including the binary one — must grant it (a reusable workflow can't request more than its caller grants).
  2. apko publish --sbom-path needs the dir to pre-exist → mkdir -p sbom (landed in PR2).
  3. attest.yml carries its own docker/login-action — the build job's GHCR login doesn't cross the reusable-workflow boundary.

Validation

  • 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 can't be exercised by the dry-run — it's validated by the throwaway-tag rehearsal after this merges (which is exactly how the sibling caught the 3 fixes above; they're pre-applied here).

🤖 Generated with Claude Code

…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>
@jmgilman
jmgilman merged commit dc616c9 into master Jun 28, 2026
11 checks passed
@jmgilman
jmgilman deleted the ci/slsa-l3-provenance branch June 28, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant