release/provenance/release-files
Releases attest build provenance
Implements release/provenance for the release-files artifact: it runs when the release publishes one (see artifacts).
| Severity | warning |
| Tiers | 1 |
| Artifact | release-files |
| Scope | root |
| Kind | outcome |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
The workflow that publishes the release files attests its provenance: actions/attest-build-provenance (the subject path covering the files), the SLSA generator, cosign attest-blob, or GitLab’s artifact provenance (RUNNER_GENERATE_ARTIFACTS_METADATA: "true").
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
Add actions/attest-build-provenance with subject-path covering the release files (GitHub), RUNNER_GENERATE_ARTIFACTS_METADATA: "true" (GitLab) or cosign attest-blob --predicate (Gitea) to the release workflow.
Agent instruction: Add a step uses: actions/attest-build-provenance with subject-path covering the release files (or subject-name and subject-digest for an image, with push-to-registry: true); grant id-token: write and attestations: write to that job only. On GitLab set the variable RUNNER_GENERATE_ARTIFACTS_METADATA to “true” on the release job. On Gitea write a SLSA v1 predicate and run cosign attest-blob --type slsaprovenance1.
A finding of this rule points at the file artifact.workflows.size() > 0 ? artifact.workflows[0] : ".github/workflows/release.yml" yields.
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 binaries)
- https://github.com/slsa-framework/slsa-github-generator (spec)
- https://docs.gitlab.com/ci/runners/configure_runners/ (spec, Artifact provenance metadata)
Generated by fleetlint docs from catalog v0.6.0.