PowerShell / PowerShell/PSResourceGet

Deterministic/reproducible packaging for `Compress-PSResource`

Aperta
#2,047 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature_request Needs-Triage
Lingua principale
C#
Stelle
576
Fork
114
Merge medio
1g 2h
PR unite (30g)
7

Descrizione

Summary of the new feature / enhancement

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.

Proposed technical implementation details (optional)

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.

  1. 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.
  2. Provide a new parameter -Timestamp. When this parameter is set, all files in the package should use this timestamp.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Begin at the Compress-PSResource entry point and trace package generation, including timestamps, PSMDCP naming, .rels, and [Content_Types].xml ordering. Done means default output is reproducible and -Timestamp applies to all packaged files, with deterministic names and XML ordering.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, powershell
Ambito
cli, tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.