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

release/reproducible-build/java

Release builds are reproducible

Implements release/reproducible-build for java.

Severityinfo
Tiers1
Stacksjava
Scoperoot
Kindoutcome
Sourcelibrary v0.3.1
Selected byfleetlint-recommended@v0.3.1

Requirement

Archives are reproducible: Maven sets project.build.outputTimestamp; Gradle sets preserveFileTimestamps = false and reproducibleFileOrder = true on its archive tasks, or the wrapper is Gradle 9 or later, where that is the default; or SOURCE_DATE_EPOCH is set for the release build.

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

Fix

Maven: set <project.build.outputTimestamp> (the release plugin updates it); Gradle: configure tasks.withType<AbstractArchiveTask> or update to Gradle 9.

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.

See: https://fleetlint.org/baseline/#releases, https://reproducible-builds.org/docs/, https://fleetlint.org/stacks/#java


Generated by fleetlint docs from catalog v0.3.1.