| > However, the service that performs underlying updates to the registry data determined which package to publish based on the contents of the uploaded package file Yeah, this is what's going to keep me up tonight. Yikes. I can't help but wonder if the root cause was HTTP request smuggling, or if changing package.json was enough. How do we even mitigate against these types of supply-chain attacks, aside from disabling run-scripts, using lockfiles and carefully auditing the entire dependency tree on every module update? I'm seriously considering moving to a workflow of installing dependencies in containers or VMs, auditing them there, and then perhaps commiting known safe snapshots of node_modules into my repos (YUCK). Horrible developer experience, but at least it'll help me sleep at night. |
Don’t import thousands of modules from third parties just to write a simple web app. If you have 10 stable dependencies it’s no problem to vendor them and vet changes. If you have 10k you’ve entirely given up on any pretence of security.