Interview Prep/DevSecOps/Supply Chain Security

How do you generate build provenance for a GitHub Actions release?

IntermediateScenarioSupply Chain Security
Answer

Situation read → Provenance records the repo, commit, workflow and builder identity, signed by the platform.

What I'd do →

  1. Add permissions id-token: write, attestations: write, contents: read.
  2. Use actions/attest-build-provenance with the artifact path or image digest:
- uses: actions/attest-build-provenance@<sha>
  with:
    subject-name: ghcr.io/example-org/app
    subject-digest: ${{ steps.push.outputs.digest }}
    push-to-registry: true
  1. Verify before deploy: gh attestation verify oci://ghcr.io/example-org/app@sha256:... --owner example-org.

Why → Verification links an artifact to a specific repo and workflow.

Interview tip → Provenance proves origin, not that the code is free of bugs.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply Chain Security