News for hackers. Stuff that matters.
Re:Self Propagating NPM Malware Compromises over 40 Packages by Ygg2 on Tuesday September 16, 2025 @09:00PM (#45270283)
Yeah. You have dev dependencies in there, those alone will increase number of dependencies by ~500, without ending up in the final product.

Those numbers are way off their actual number.

Re:Self Propagating NPM Malware Compromises over 40 Packages by what on Tuesday September 16, 2025 @11:31PM (#45271323)
500 dev dependencies doesn’t seem reasonable either…
Re:Self Propagating NPM Malware Compromises over 40 Packages by zwnow on Wednesday September 17, 2025 @02:20AM (#45272401)
Even 50 seems unreasonable...
Re:Self Propagating NPM Malware Compromises over 40 Packages by ncruces on Wednesday September 17, 2025 @02:30AM (#45272468)
Right. Allowing 500 strangers to push code to our CI infra, or developer laptops, with approximately zero review, sounds similarly ill advised.

That JLR got their factories hacked, rather than customer cars, is less bad for sure. But it's still pretty bad.

Also, before arguing that code generators should get a pass as they don't “end up in the final product”, you really should read “Reflections on trusting trust” by Ken Thompson.

Re:Self Propagating NPM Malware Compromises over 40 Packages by Ygg2 on Wednesday September 17, 2025 @04:16AM (#45273212)
> Right. Allowing 500 strangers to push code to our CI infra

That's bullshit, pure and simple. If you pull in a deeply nested dependency like icu_normalizer it has 30 dependencies, OMGHAXOZRS.

Except of the 30 depedencies crates, there are 10 from ICUX repository, and then you have almost standard dependencies like proc-macro/syn/quote crates from dtolnay, `zerofrom` from safe transumte project from Google. smallvec from the Servo project, and yoke from... checks notes... from ICUX.

The only few remaining crates here are `write16`, `utf8_iter` and `utf16_iter` that are written from hsivonen.

So even for 30 dependencies, you actually depend on proc-macro/syn/quote which are foundational crates. Few crates from Google, few crates from Servo, and three crates written by rust-lang contributor.

Re:Self Propagating NPM Malware Compromises over 40 Packages by ncruces on Wednesday September 17, 2025 @04:43AM (#45273391)
It's great that you did that due diligence once. It really is. If I were reviewing that merge request, and you told me that, I'd be inclined to approve.

But how do we scale that to 1000 dependencies, and every one of their updates? What tools are there to help us, and does the community at large use them?

What I really don't like, and why I wrote that it's a culture issue, is the lightness with which these decisions are often made.

My most popular library has about a dozen dependencies. The README states clearly and “above the fold” what are the core deps (3, no transitive). Every other dependency is either first party, or optional and justified with a comment in the deps file (if you don't use the optional feature, it doesn't end up in your deps file).

There's also a generated BLOB. The generation of the BLOB is reproducible in your own environment, and its provenance attestated.

Those are all risks, that I'm passing on to my users, but I do my best to mitigate them, and communicate this clearly to them.

Re:Self Propagating NPM Malware Compromises over 40 Packages by Ygg2 on Thursday September 18, 2025 @09:27AM (#45289437)
> But how do we scale that to 1000 dependencies, and every one of their updates? What tools are there to help us, and does the community at large use them?

Use

    cargo install cargo-supply-chain
    cargo supply-chain --publishers
Run it for whatever you want to check, then have a lunch, it takes 10-30min.

It will list exactly how many organizations, and even individuals with publish rights are there. For turso there are 51 repositories, and 243 different individuals with publish rights.

Of course, this still doesn't group by github org and so on.

Re:Self Propagating NPM Malware Compromises over 40 Packages by Etherlord87 on Wednesday September 17, 2025 @05:17AM (#45273569)
Sorry, I don't know much about the subject, so this is not a rhetorical or even just loaded question:

Isn't it actually the case that you started with 3 strangers, but 27 of them were relatively easy (still took some time) to figure out as safe?

Re:Self Propagating NPM Malware Compromises over 40 Packages by Ygg2 on Wednesday September 17, 2025 @09:13AM (#45275437)
You have 30 items you bought from various stores. You bought ~20 from yourself, around 5 from Google, 4 from hsivonen and one from servo.

You could of course investigate individuals commits, but that's probably an overkill.