fleetlint Policy for a fleet of repositories
v0.11 (latest)
Getting started

release/reproducible-build/nuget

Release builds are reproducible

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

Severityinfo
Tiers1
Artifactnuget
Scoperoot
Kindoutcome
Sourcelibrary v0.8.0
Selected byfleetlint-recommended@v0.8.0

Requirement

ContinuousIntegrationBuild is true for the packaging build (in a project or Directory.Build.props, or -p:ContinuousIntegrationBuild=true in the workflow that pushes the package), which maps source paths away; deterministic compilation is the SDK 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 || repo.artifacts.size() > 0

Parameters

  • skip: ^\s*[@+-]*\s*(\{\{[^}]*\}\}\s*|\$[({][A-Za-z_]+[)}]\s*)?(#|//|echo\b|printf\b|(sudo\s+)?(go (install|get)|cargo b?install|pipx? install|pip3 install|python3? -m pip install|uv (tool |pip )?(install|add)|(npm|pnpm|yarn|bun) (i|install|add|global add)|gem install|bundle add|brew install|dotnet tool (install|update)|composer (global )?require|apt(-get)? install|curl|wget)\b[^;&]*$)

Fix

Add <ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild> to Directory.Build.props.

Agent instruction (from release/reproducible-build): 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.

A finding that names no file points at Directory.Build.props.

Sources


Generated by fleetlint docs from catalog v0.8.0.