npm should take responsibility and up their game here. It’s possible to analyze the code and mark it as suspicious and delay the publish for stuff like this. It should prevent publishing code like this even if I have a gun to my head
I think malware check should be opt-in for package authors, but provide some kind of 'verified' badge to the package. Edit: typo
You too can run malware from NPM (I mean without consequences)
11–20 of 122 posts
Re: You too can run malware from NPM (I mean without consequences)
#12Re: You too can run malware from NPM (I mean without consequences)
#13How much money have the attackers stolen so far? Has someone done an analysis of the blockchains for the destination addresses?
click through to the article, it has a link to a view that lists the laughable profit
Re: You too can run malware from NPM (I mean without consequences)
#14Is it typical in the JS space to include dependencies without versioning? Also, curious: does freezing a version really provide much protection? Shouldn’t a commit hash be used? (Attacker can change a tag.)
Installing from git is not recommended and has more issues than you might think https://dev.to/naugtur/a-phish-on-a-fork-no-chips-52cc
You are supposed to update packages, even if you use lockfiles (very common) or tools that pin your direct dependencies (renovate etc. not so common) And when you do update, will you read the package and all of its updated dependencies?
It's a hard problem with a bunch of tradeoffs.
Can be done, with enough attention and tools. Tools include LavaMoat :)
Re: You too can run malware from NPM (I mean without consequences)
#15npm should take responsibility and up their game here. It’s possible to analyze the code and mark it as suspicious and delay the publish for stuff like this. It should prevent publishing code like this even if I have a gun to my head
Re: You too can run malware from NPM (I mean without consequences)
#16LavaMoat looks great on paper, but not supporting Webpack HMR is a dealbreaker.
You're using HMR in your app's production bundle? How?
Re: You too can run malware from NPM (I mean without consequences)
#17How much money have the attackers stolen so far? Has someone done an analysis of the blockchains for the destination addresses?
click through to the article, it has a link to a view that lists the laughable profit
Re: You too can run malware from NPM (I mean without consequences)
#18Re: You too can run malware from NPM (I mean without consequences)
#19Is it typical in the JS space to include dependencies without versioning? Also, curious: does freezing a version really provide much protection? Shouldn’t a commit hash be used? (Attacker can change a tag.)
Re: You too can run malware from NPM (I mean without consequences)
#20Earlier quoted context omitted.
I think malware check should be opt-in for package authors, but provide some kind of 'verified' badge to the package. Edit: typo
npm is on life support by msft. But there's socket.dev that can tell you if a package is malicious within hours of it being published.