release/provenance/oci-artifact
Releases attest build provenance
Implements release/provenance for the oci-artifact artifact: it runs when the release publishes one (see artifacts).
| Severity | warning |
| Tiers | 1 |
| Artifact | oci-artifact |
| Scope | root |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
Provenance is attached to the artifact digest: actions/attest-build-provenance with subject-digest and push-to-registry: true, cosign attest --type slsaprovenance, or the SLSA generic generator over the digest.
Why
Provenance ties the artifact to the exact source and workflow that built it, which a signature alone does not.
Capability applies when
release.exists || repo.artifacts.size() > 0Fix
After the push step add actions/attest-build-provenance with subject-name: <registry>/<repository>, subject-digest: <digest> and push-to-registry: true; the job needs id-token: write and attestations: write.
Agent instruction: Add actions/attest-build-provenance after the push step with subject-name, subject-digest from the push step’s output and push-to-registry: true; grant id-token: write, attestations: write and packages: write to that job only.
A finding that names no file points at the first workflow that publishes the artifact, or .github/workflows/release.yml when there is none.
Sources
- https://slsa.dev/spec/v1.0/provenance (standard)
- https://slsa.dev/spec/v1.0/levels (standard, Build L1: Provenance exists)
- https://csrc.nist.gov/pubs/sp/800/218/final (standard, PS.3.2: Collect, safeguard, maintain, and share provenance data for all components of each software release)
- https://fleetlint.org/baseline/#releases
- https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds (guidance, Generating build provenance for container images)
- https://docs.sigstore.dev/cosign/verifying/attestation/ (spec)
Generated by fleetlint docs from catalog v0.8.0.