←back to thread

1369 points universesquid | 1 comments | | HN request time: 0.22s | source
Show context
dist-epoch ◴[] No.45170028[source]
Given that most of these kind of attacks are detected relatively quickly, NPM should implement a feature where it doesn't install/upgrade packages newer than 3 days, and just use the previous version.
replies(3): >>45170138 #>>45170232 #>>45170382 #
mcintyre1994 ◴[] No.45170138[source]
Would it be spotted quickly if nobody got the update though? It'd probably just go undetected for 3 days instead. In this case one team spotted it because their CI picked up the new version (https://jdstaerk.substack.com/p/we-just-found-malicious-code...).
replies(1): >>45170482 #
1. skybrian ◴[] No.45170482[source]
The question is who picks up the vulnerable version first. With minimal version selection (like Go has), the people with a direct dependency on the vulnerable library go first, after running a command to update their direct dependencies. People with indirect dependencies don’t get the new version until a direct dependency does a release pointing at the vulnerable version, passing it on.

Not sure if that would be a better result in the end. It seems like it depends on who has direct dependencies and how much testing they do. Do they pass it on or not?