You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deterministic/reproducible packaging for Compress-PSResource #2047
Deterministic/reproducible builds are an undeniably important feature for auditability and security. Currently, Compress-PSResource doesn't provide support for that, and it should.
Currently, I post-process my packages to ensure fully reproducible output, which takes significant time in a build.
There are a few sources of non-determinism I have observed in Compress-PSResource:
The timestamps of files in the zipped package.
The PSMDCP file name is non-deterministic. Consequently, the .rels file content is non-deterministic.
The [Content_Types].xml content, notably the order of children, is non-deterministic. (? I remember observing this but couldn't give a stable reproduction at the moment.)
Suggestion.
Make Compress-PSResource deterministic by default. PSMDCP name can be a hash of non-.rels non-.psmdcp files, and [Content_Types].xml children should be sorted.
Provide a new parameter -Timestamp. When this parameter is set, all files in the package should use this timestamp.
Activity
SydneyhSmith commentedon Sep 23, 2026
Ji Luo (@GeeLaw) thanks we would accept a PR for this, otherwise will put in our backlog
cc: Justin Chung (@jshigetomi)