fleetlint Policy for a fleet of repositories
v0.8
Getting started

release/provenance/crate

Releases attest build provenance

Implements release/provenance for the crate artifact: it runs when the release publishes one (see artifacts).

Severitywarning
Tiers1
Artifactcrate
Scoperoot
Kindexpr
Sourcelibrary v0.5.0
Selected byfleetlint-recommended@v0.5.0

Requirement

crates.io has no provenance attestations yet; a crate is checked for trusted publishing (release/trusted-publishing/crate).

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() > 0

Applies when

false

Check

true

Fix

Add actions/attest-build-provenance (GitHub), RUNNER_GENERATE_ARTIFACTS_METADATA: "true" (GitLab) or cosign attest-blob --predicate (Gitea) to the release pipeline for files, cosign attest or BuildKit provenance for an image; a package published to npm, PyPI or RubyGems gets it from trusted publishing.

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.

Sources


Generated by fleetlint docs from catalog v0.5.0.