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
ModuleTree: authenticate a module bump with npm's registry signatures, not a vendor lockfile #574
ModuleTree: authenticate a module bump with npm's registry signatures, not a vendor lockfile
Why.scripts/modules-pin.mjs authenticates every ModuleTree lock against the .pnpm/lock.yaml of a pinned vendor deb, whose length, SHA-256 and signature were checked when that pin was written. After #171 M6b, those two deb records stay only as pin-time provenance (ruling 1193 (a)). That chain holds while some vendor package vouches for the closure we want. It breaks when we want a bump the vendor doesn't ship: a security fix to one package, a version the vendor hasn't adopted yet, or once #117 retires the macOS vendor runtime too. Then cua has no authenticator of its own.
What. Let modules-pin authenticate each package from npm's registry signatures, as npm audit signatures does:
the registry's ECDSA P-256 signature over <name>@<version>:<dist.integrity>;
keys from https://registry.npmjs.org/-/npm/v1/keys, honouring each key's expires;
the key set pinned in the repo and changed only by review, never fetched at install;
where a package carries a provenance attestation, record it.
The vendor-lock route stays available. Whichever route authenticates a package is recorded in provenance.json.
Done when:
modules-pin authenticates a closure with no vendor deb given. It refuses:
an unsigned package;
a signature that doesn't verify;
a key that is unknown, or that had expired when it signed;
an integrity that differs from the lock.
The tests use fixture keys and constructed packuments: each refusal, and a good closure.
provenance.json records the route for each package and stays reproducible byte for byte.
Install, doctor and launch are unchanged: they verify against the lock as today.
Activity