How to Ruin All of Package Management

36 points by gerikson


dzwdz

Package management worked because the stakes were low

Running arbitrary code on people's computers is low stakes?

josephjnk

Publishing a package costs nothing. No identity verification. No deposit. No waiting period. You sign up, you push, it’s live. This was a feature: low barriers to entry let unknown developers share useful code without gatekeepers. The npm ecosystem grew to over 5 million packages because anyone could participate.

Funnily enough this is only mostly true now. I recently published a package to npm for the first time in like 10 years. I decided to make a new npm account to separate anything worthwhile that I do from the crap packages that I published when I was new to node. Publishing now requires 2FA, and doesn't allow the use of a 2FA authenticator app, so I needed to buy a yubikey. It was weird having to spend money in order to share code (even if it's just a 1 time setup, which many people will already own) but I think it's an understandable tradeoff given the security challenges facing the npm ecosystem.

Npm's publishing security changes also seem to give preferential treatment to publishing via CI jobs in GitHub and GitLab. They say they'll support self-hosted runners eventually, but I do wonder whether this is a movement towards more integrated control over the package lifecycle.