Live data from Hacker News

Malicious npm packages detected across Red Hat Cloud Services

github.com

11–20 of 494 posts

Re: Malicious npm packages detected across Red Hat Cloud Services

#11
post #5

Our company uses yarn 4 which has an option to prevent you from installing an npm package for the first number of days of its release. Most of these seem to be caught within that timeframe (1-3 days). https://gist.github.com/mcollina/b294a6c39ee700d24073c0e5a4e...

What happens when everyone adopts this policy? You just change it to two weeks?

[deleted]

Re: Malicious npm packages detected across Red Hat Cloud Services

#13
post #3

'No Way to Prevent This,' Says Only package manager Where This Regularly Happens Edit: some people don't understand that it's a defence to https://en.wikipedia.org/wiki/%27No_Way_to_Prevent_This,%27_...

The big attacks of today are spread across several package ecosystems: TrapDoor and Shai-Hulud have been hitting npm, pypi, composer, and crates with the same malware.

Re: Malicious npm packages detected across Red Hat Cloud Services

#15
post #5

Our company uses yarn 4 which has an option to prevent you from installing an npm package for the first number of days of its release. Most of these seem to be caught within that timeframe (1-3 days). https://gist.github.com/mcollina/b294a6c39ee700d24073c0e5a4e...

What happens when everyone adopts this policy? You just change it to two weeks?

You rely on the security companies scanning the packages.

Re: Malicious npm packages detected across Red Hat Cloud Services

#16
post #3

'No Way to Prevent This,' Says Only package manager Where This Regularly Happens Edit: some people don't understand that it's a defence to https://en.wikipedia.org/wiki/%27No_Way_to_Prevent_This,%27_...

PyPI and Cargo are, 100%, vulnerable to this same class of compromises. That NPM sucks isn't a statement that everyone else doesn't.

Re: Malicious npm packages detected across Red Hat Cloud Services

#17
I came across this interesting rant the other day: https://github.com/uNetworking/uWebSockets.js/blob/master/mi...

It does make sense that the right way would be to fork every dependency you use and install from your own repo reviewing and merging from upstream as needed. Would be a giant PITA though. :)

Re: Malicious npm packages detected across Red Hat Cloud Services

#19
post #5

Our company uses yarn 4 which has an option to prevent you from installing an npm package for the first number of days of its release. Most of these seem to be caught within that timeframe (1-3 days). https://gist.github.com/mcollina/b294a6c39ee700d24073c0e5a4e...

What happens when everyone adopts this policy? You just change it to two weeks?

Always one day more than people on HN tell you. If something is compromised you will hear people complaining here that three days is not enough.

Re: Malicious npm packages detected across Red Hat Cloud Services

#20
post #5

Our company uses yarn 4 which has an option to prevent you from installing an npm package for the first number of days of its release. Most of these seem to be caught within that timeframe (1-3 days). https://gist.github.com/mcollina/b294a6c39ee700d24073c0e5a4e...

What happens when everyone adopts this policy? You just change it to two weeks?

A large array of automated and semi-automated security scanners are finding things quickly. The main benefit of waiting before updating is to give those scanners time to work.
Post reply on HN