r/javascript • u/ttariq1802 • Apr 14 '26
Trustlock: a dependency admission controller that enforces npm trust signals as policy
https://github.com/tayyabt/trustlock
19
Upvotes
r/javascript • u/ttariq1802 • Apr 14 '26
View all comments
Show parent comment
1
u/ttariq1802 Apr 18 '26
Trust signals right now are: SLSA provenance attestations (did the package publish through verified CI?), publish timestamp (how fresh is it?), install script presence (does it run code on install?), and publisher identity (did the npm account change between versions?). The high-value signal is regression, not presence. "This package had provenance last version and doesn't now" is much more actionable than "this package doesn't have provenance."
On false positives: that's exactly why the approval workflow exists. When trustlock blocks something legitimate, the developer runs a one-line approve command with a reason and an expiry. The approval is committed to Git and goes through code review. Without that, teams disable the tool. With it, they keep strict defaults and document exceptions.