4 ms·
That's not really the solution for this problem, though, which is very specifically when a project maintainer's account gets compromised, so then the bad guys p
by hn_throwaway_99 5y ago
That's not really the solution for this problem, though, which is very specifically when a project maintainer's account gets compromised, so then the bad guys publish a new malicious version of that library that gets picked up by anyone using non-pinned NPM versions (i.e. most everyone).
There are a couple more straightforward ways to do this:
1. Require 2FA, ideally hardware key 2FA, for anyone publishing a package with any sizable following.
2. Make running of preinstall/install scripts opt-in.
3. Make the semantic versioning syntax optionally more restrictive. If I specify I want version ^2.2.1, I'd like to be able to specify that I DON'T want to pull 2.2.2 the moment it becomes available, but perhaps want some amount of latency before pulling that.
- ricardobayes 5y ago2. Make running of preinstall/install scripts opt-in. They already are, npm install --ignore-scripts
- hn_throwaway_99 5y agoWhat you've written there is literally the definition of opt out.
- rndhouse 5y agoReviews in Vouch refer to a particular version of a software package. If a new release is issued by a malicious actor, the new release would require a new review. But the review process does not need to re-start from scratch. Reviews from other versions can be used to lessen the workload. On the subject of automatically updating packages: the Vouch dependency analysis can be included in CI. Un-reviewed or review failing dependency updates can be flagged for attention.
- throwaway984393 5y agoWho's reviewing the software package's dependencies?
- rndhouse 5y agoEach dependency of a software package would have its own separate set of reviews. Anyone can produce a review using Vouch. Official reviews will also be published in the future.
- throwaway984393 5y agoSo every version of every dependency of every package needs a review? It only takes one version of one dependency of any software package to be compromised by supply chain.
- rndhouse 5y agoEach developer may choose to minimize the software dependency attack surface to a different degree. Perhaps they would trust a package published by Google without a review. But would require a review before using a package from an indie developer. Incremental decreses in the attck surface are valuable.