Implement GitHub Actions build attestations using the attest-build-provenance action and verify the attestation with the GitHub CLI before a downstream deployment job proceeds

domain: GitHub Actions · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add permissions: id-token: write and attestations: write to the build job; after building the artifact, call actions/attest-build-provenance with subject-path pointing to the artifact file
  2. The action generates an in-toto attestation bundle and uploads it to the GitHub Attestations API, returning a bundle URL; capture it as a job output
  3. In a verification job that depends on the build job, install the GitHub CLI and run gh attestation verify with the artifact path, the expected owner, and the signer workflow URI to confirm the provenance before deployment
  4. Use gh attestation verify --deny-self-hosted-runners to reject attestations produced on self-hosted runners that may not have tamper-proof OIDC tokens
  5. Store the verified artifact digest in a job output and pass it to the deploy job so the deploy script pulls the exact digest rather than a mutable tag
  6. Add a policy step using OPA to evaluate the attestation JSON against a Rego rule that enforces the signer repo, ref, and workflow path before allowing promotion to production

Known gotchas

Related routes

Publish GitHub artifact attestations using the actions/attest-build-provenance action and verify them
docs.github.com · 6 steps · unrated
Generate SLSA Build Level 2 provenance attestations in GitHub Actions and verify with slsa-verifier
docs.github.com/actions/security-for-github-actions/using-artifact-attestations · 6 steps · unrated
Generate a SLSA provenance attestation for a build artifact using slsa-github-generator in GitHub Actions and verify it with slsa-verifier
slsa.dev · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans