NuGet/Home

Use a deterministic order for files when calculating psmdcp hash

Fermée

#14 916 ouverte le 23 mai 2026

 (0 commentaire) (0 réaction) (0 personne assignée)HTML (292 forks)batch import
Functionality:PackPriority:2Type:Featurehelp wanted

Métriques du dépôt

Stars
 (1 459 étoiles)
Métriques de merge PR
 (Merge moyen 464j 23h) (1 PR mergée en 30 j)

Description

NuGet Product(s) Involved

dotnet.exe

The Elevator Pitch

With reproducible builds, software can become more trustworthy, transparent and secure. It becomes easier to verify that binaries have not been tampered with it, and easier to identify some types of security attacks.

As part of that, it would be great if nupkgs were fully reproducible.

One current area of non-reproducibility, missed in https://github.com/NuGet/Home/issues/14448, is the order of files used to generate the psmdcp hash in PackageBuilder .

NuGet.Client's PackageBuilder.CalcPsmdcpName relies on the order the files defined in the manifest. The order is non-deterministic when file globs are used (example). We should make this order well-defined.

Additional Context and Details

Relates to https://github.com/dotnet/source-build/issues/4963

Guide contributeur