Interview Prep/CI/CD/GitHub Actions

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 }
All CI/CD questions

More on GitHub Actions