top | item 45180729

(no title)

naugtur | 5 months ago

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.

discuss

order

shreddit|5 months ago

“within hours” is at least one hour too late, and most likely multiple hours.

naugtur|5 months ago

Absolutely not. you get npm packages by pulling not them pushing them to you as soon as a new version exist. The likelyhood of you updating instantly is close to zero and if not, you should set your stuff up so that it is. Many ways to do that. Even better if compared to a month or two - which is how long it often takes for a researcher to find a carefully planted malware.

Anyway, the case where reactive tools (detections, warnings) don't catch it is why LavaMoat exists. It prevents whole classes of malware from working at runtime. The article (and repo) demonstrates that.

Cthulhu_|5 months ago

Depends on whether they hold publishing to the main audience until said scan has finished.