News for hackers. Stuff that matters.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by userbinator on Monday February 10, 2025 @03:46PM (#43004940)
NPM, why am I not surprised... and this broadly applies to the JS ecosystem.

When people delegate their brains to others, their own judgment naturally deteriorates and it makes them much easier to fool.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by diggan on Monday February 10, 2025 @04:17PM (#43005261)
> When people delegate their brains to others, their own judgment naturally deteriorates and it makes them much easier to fool

A thought as old as thoughts about thoughts are, almost:

> For this invention will produce forgetfulness in the minds of those who learn to use it, because they will not practice their memory. Their trust in writing, produced by external characters which are no part of themselves, will discourage the use of their own memory within them. You have invented an elixir not of memory, but of reminding; and you offer your pupils the appearance of wisdom, not true wisdom, for they will read many things without instruction and will therefore seem to know many things, when they are for the most part ignorant and hard to get along with, since they are not wise, but only appear wise.

The quote above is about books, from Plato's dialogue Phaedrus 14 (370-360 BCE). You by any chance feel the same about books as you feel about reusable JavaScript modules published on npm?

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by lm28469 on Monday February 10, 2025 @04:38PM (#43005518)
This plato's quote about books is too often used as something like: "someone smart was wrong about something once, hence everyone is wrong about every new thing forever"

Nothing is black nor white but npm brought its fair share of dumb shit: https://en.m.wikipedia.org/wiki/Npm_left-pad_incident

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by josh-at-banxa on Monday February 10, 2025 @07:53PM (#43007521)
>Nothing is black nor white but npm brought its fair share of dumb shit

Sure. So too have books. In that instance, does the blame lie on the advent of books, or to the reader too naive to tell the difference?

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by diggan on Monday February 10, 2025 @05:05PM (#43005863)
> This plato's quote about books is too often used as something like: "someone smart was wrong about something once, hence everyone is wrong about every new thing forever"

I mean, it is fairly similar to what parent actually wrote, isn't it a relevant quote in the context? You're not actually arguing for one way or another, but simply because you've seen the quote multiple times before, it doesn't apply, or what are you trying to say?

How is the left_pad incident related to developers becoming easier to fool?

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by seanthemon on Monday February 10, 2025 @05:15PM (#43005997)
There should be a quote for that
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by specialist on Wednesday February 12, 2025 @10:06AM (#43026080)
Yes and: Technology (progress) always presents a tradeoff. It is never wholly positive. h/t Neil Postman's Technopoly.

On the balance, writing has been a net positive. Probably. Plato wasn't wrong; he could (or would) not anticipate the upsides.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by Veserv on Monday February 10, 2025 @05:37PM (#43006197)
Not the OP, but yes. Blindly reciting and believing the contents of books without any discernment also makes you a fool.

If you do not believe that, then might I interest you in uncritically imbibing the succulent nectar of wisdom flowing from the Flat Earth Society?

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by mikedelfino on Monday February 10, 2025 @05:45PM (#43006259)
My layman’s understanding, based solely on the quote you cited, is that it criticizes books for not providing proper instruction — being just pupils, readers need a tutor. The only way this could relate to programming libraries being reused is if people didn’t even read the books back then, much like they don’t read the libraries' source code right now.

I’m by no means agreeing with the quote, nor am I against reusing programming libraries carelessly; I just don’t see how the two are related.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by twelve40 on Monday February 10, 2025 @04:11PM (#43005199)
how um is this different from pypi or public repos in other languages... you could try to publish junk anywhere
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by recursive on Monday February 10, 2025 @04:21PM (#43005312)
In node projects, having more dependencies is usually seen as an asset, not a liability.

Other than that, I don't think there's a difference. When I write node projects, I tend to minimize dependencies, but I've seen PR comments saying "you know you could just get a package to do that".

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by girvo on Monday February 10, 2025 @06:08PM (#43006464)
> In node projects, having more dependencies is usually seen as an asset, not a liability

Not in anywhere I've worked for the past ~decade...

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by recursive on Monday February 10, 2025 @06:34PM (#43006708)
Replies seem to be indicating my experience is the outlier. That's reassuring to me.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by girvo on Monday February 10, 2025 @07:30PM (#43007287)
It was definitely the case prior, though, so you're not completely off base :)
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by cluckindan on Monday February 10, 2025 @04:25PM (#43005363)
”Usually”?

Do you have some statistics on that, or do you just feel that way?

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by recursive on Monday February 10, 2025 @04:30PM (#43005423)
Just feel that way. That's my anecdotal observation. YMMV.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by wswope on Monday February 10, 2025 @05:19PM (#43006040)
[Misread, mb - ty @Jarwain]
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by Jarwain on Monday February 10, 2025 @05:31PM (#43006141)
You may have mixed up who the commenter was replying to. They were specifically questioning "usually seen as an asset not a liability" bit
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by bolognafairy on Monday February 10, 2025 @06:11PM (#43006495)
That’s really all there is in the comment. They’re unambiguously conflating “number of dependencies are higher” with some sort of statement about the value system of people that work with a certain language. It’s silly language tribalism.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by Fauntleroy on Monday February 10, 2025 @05:49PM (#43006306)
This is an extremely weird thing to say. I don't know a single node dev who wants more dependencies. Anyone with a modicum of experience in the space knows the cost of bringing in more external code.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by wswope on Monday February 10, 2025 @05:11PM (#43005952)
The lack of a batteries-included stdlib makes the JS ecosystem exceptionally vulnerable. PyPI is vulnerable to the same class of problems, but it’s an order of magnitude harder to execute a wide-reaching supply chain attack compared to NPM, since the dependency trees are far shorter on average.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by bdhcuidbebe on Monday February 10, 2025 @07:13PM (#43007126)
With tensorflow and more recently local llm:s, running say ollama pulls in a scary amount of precompiled binaries from god knows where.

Just mentioning these because they are trendy.

Regarding the general issue, it can happen in any language with package management.

Its not reasonable to just yell js sucks because I’ve seen it in bunch of places by now.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by nailer on Monday February 10, 2025 @03:55PM (#43005043)
JS/TS having code reusability isn't a problem. Other ecosystems don't have the same problems not because they have package repos just as good as npm but write everything from scratch out of virtue, but because they don't have package repos just as good as npm.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by sigzero on Monday February 10, 2025 @03:59PM (#43005082)
> because they don't have package repos just as good as npm

What? That simply is not true unless you mean "good" as in "good in spreading malware". lol

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by paulddraper on Monday February 10, 2025 @06:07PM (#43006463)
"Easy to use" being more descriptive.

Which is a help for spreading both good code and malware.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by bolognafairy on Monday February 10, 2025 @06:14PM (#43006515)
I’d be curious to hear what you think that PyPI et al are doing that NPM should be copying. It sounds like you’re pretty knowledgeable in this area, to be comfortable making comments like this with such confidence.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by nailer on Tuesday February 11, 2025 @01:47AM (#43009742)
I would respond, but you have not provided any supporting arguments.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by filoeleven on Monday February 10, 2025 @04:30PM (#43005416)
I found it even more unsurprising that the fake extension targeted some crypto thing.

> it has the same description as the original truffle extension: “Build, debug and deploy smart contracts on EVM-compatible blockchains.”

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by paulddraper on Monday February 10, 2025 @05:27PM (#43006110)
> why am I not surprised

Because VSCode and npm are popular.

It’s not like Ruby gems are immune to this. They just aren’t as popular.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by j-bos on Monday February 10, 2025 @05:59PM (#43006408)
For variety, here's an example from the Go ecosystem: https://arstechnica.com/security/2025/02/backdoored-package-...
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by dawnerd on Monday February 10, 2025 @06:08PM (#43006471)
I definitely feel like NPM could be doing more to detect these. Right now it really feels like they're just hands off.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by bolognafairy on Monday February 10, 2025 @06:08PM (#43006472)
This is an ironic statement, right? Because you’re mindlessly parroting a copy of a copy of what was once, probably, an intelligent and appropriately nuanced take? And because you’re attributing this to the “JS ecosystem” when supply chain attacks are common in many different ecosystems?

LLM-ass comment.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by elaus on Tuesday February 11, 2025 @03:01AM (#43010196)
Worst of all: the article never explains what npm has to do with it. Vscode extensions are not installed via npm, so at least part of the malware depends on the Vscode extension store.
Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by ajross on Monday February 10, 2025 @06:38PM (#43006746)
> When people delegate their brains to others

I dunno, Linux distros have a pretty good track record at the same problem, over multiple decades of evidence.

The difference is that they don't allow self-publication. Canonical and Red Hat et. al. work downstream of an active community of developers cross-attesting good software. So their problem becomes "This software is known to be good, let's package it!". So to get malware into the machines of users it's not enough to fool the users, you need to fool the packagers too. And it happens, but very rarely (c.f. the xzutils mess from last year).

Node and similar repositories thought they could short-circuit that process, and as has been extensively documented, it doesn't work because users are too lazy to authenticate their own software.

Re:Fake VS Code Extension on NPM Spreads Multi-Stage Malware by lolinder on Monday February 10, 2025 @11:45PM (#43009070)
Is this even related to npm? The extension was on the VS Code marketplace, I can't see any evidence that npm is involved at all besides that it's referenced in passing exactly once in the article:

> the need for caution when installing VS Code extensions, especially those obtained from public package registries like npm.

I'm not aware of any way to install a VS Code extension through NPM. The article honestly just reads like the author knew that Mend does a lot of business selling NPM dependency scanning and that they're therefore expected to stuff it as a keyword for SEO.