Skip to content

CICD-376 · SLSA provenance generation ​

Encyclopedia · Advanced security and compliance · All snippets

Previous · CICD-375 · Next · CICD-377

1. Where it fits ​

  • Placement .github/workflows/release.yml trusted step.
  • Prerequisites reviewed policies, a short-lived CI identity, and synthetic or approved test inputs.
  • Platforms github-actions.

2. Copy the snippet ​

yaml
uses: actions/attest-build-provenance@v2
with:
  subject-path: dist/release.tar.gz

3. How it works ​

The attestation action binds the package hash to workflow identity and provenance. A separate consumer should verify both the package and the trusted signer.

4. Verify the result ​

Use the trusted release workflow with id-token and attestations write. Check the generated provenance identifies the intended repository and artifact hash.

Validation version-dependent (YAML parse). Status definitions.