release/reproducible-build
Release builds are reproducible
A capability keyed by published artifact: each kind the release publishes is checked by its own implementation, and every one must pass. Implemented for android-app, apple-app, crate, gem, helm-chart, image, maven, npm, nuget, oci-artifact, pub, pypi, release-files.
| Severity | info |
| Tiers | 1 |
| Stacks | any |
| Scope | root |
| Kind | capability |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
The release build removes what differs between two builds of the same commit: local paths and timestamps. The stack’s build settings do it for the artifact, or SOURCE_DATE_EPOCH is set for the release build (in the workflow that publishes the artifact or in the task runner). Each artifact kind’s implementation says what counts for it.
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.
Applies when
release.exists || repo.artifacts.size() > 0Fix
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
- https://reproducible-builds.org/docs/ (standard, Achieve deterministic builds)
- https://reproducible-builds.org/docs/source-date-epoch/ (spec)
- https://fleetlint.org/baseline/#releases
Generated by fleetlint docs from catalog v0.5.0.