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

release/reproducible-build/crate

Release builds are reproducible

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

Severityinfo
Tiers1
Artifactcrate
Scoperoot
Kindexpr
Sourcelibrary v0.6.0
Selected byfleetlint-recommended@v0.6.0

Requirement

cargo package writes the sources with fixed timestamps; the crate of a commit is the same wherever it is packaged. Binaries built from it are checked as release files.

Why

When anyone can rebuild a release bit for bit from the tag, a tampered artifact or a compromised build machine shows up as a mismatch.

Capability applies when

release.exists || repo.artifacts.size() > 0

Applies when

false

Check

true

Fix

Set the stack’s reproducibility options in the release build (see https://reproducible-builds.org/docs/) and export SOURCE_DATE_EPOCH from the commit time.

Agent instruction: Add the stack’s reproducibility settings to the release build and derive SOURCE_DATE_EPOCH from git log -1 --format=%ct; do not change what is built.

Sources


Generated by fleetlint docs from catalog v0.6.0.