logoalt Hacker News

blueflowyesterday at 11:38 AM3 repliesview on HN

The same way it always has been done - vendor your deps.


Replies

joshstrangeyesterday at 12:12 PM

That literally makes no difference at all. You’ll just vendor the malicious versions. No, a lock file with only exact versions is the safe path here. We haven’t seen a compromise to existing versions that I know of, only patch/minor updates with new malicious code.

I maintain that the flexibility in npm package versions is the main issue here.

show 1 reply
sphyesterday at 11:48 AM

To be fair this does only work in ecosystems where libraries are stable and don't break every 3 months as it often happens on the JS world.

You can vendor your left-pad, but good luck doing that with a third-party SDK.

show 1 reply
hu3yesterday at 11:45 AM

that's what I do whenever feasible. Which is often