logoalt Hacker News

madeofpalklast Sunday at 4:04 PM2 repliesview on HN

As mentioned in the article, good NPM package managers just do this now.

pnpm does it by default, yarn can be configured. Not sure about npm itself.


Replies

chuckadamslast Sunday at 4:22 PM

Got any pointers on how to configure this for yarn? I'm not turning anything up in the yarn documentation or in my random google searches.

npm still seems to be debating whether they even want to do it. One of many reasons I ditched npm for yarn years ago (though the initial impetus was npm's confused and constantly changing behaviors around peer dependencies)

show 2 replies
progbitslast Sunday at 8:11 PM

Obviously blocking install scripts is a good thing, but this is just a false sense of security. If you install a package you will likely execute some code from it too, so the malware can just run then. And that is what the next attack will do as everyone starts using pnpm (or if npm blocks it too).

show 1 reply