What is `actions/attest-build-provenance` and what does it produce?
AdvancedConceptGitHub Actions
Answer
It generates a signed SLSA build provenance attestation for a built artifact or image, signed through Sigstore using the workflow's OIDC identity, and stores it with GitHub (and optionally in the registry). The attestation states which repo, commit, workflow and runner built the subject digest. Consumers verify with gh attestation verify ./app.tar.gz --repo org/app. It needs id-token: write and attestations: write.
permissions: { id-token: write, attestations: write, contents: read }
steps:
- uses: actions/attest-build-provenance@v2
with: { subject-path: dist/app.tar.gz }
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate