News for hackers. Stuff that matters.
Re:What NPM should do to stop a new colors attack by gigel82 on Monday January 10, 2022 @07:13PM (#29885142)
I take issue with the title of this article. This was not an attack. The project's author committed a change to his own open source project, which he had every right to do.

Was that an asshole move, and did he lose all credibility in the OSS community? Yes, absolutely. But it was not an attack.

In fact, I also take issue with GitHub / Microsoft taking over the package and am very worried about the precedent that sets, regardless if their motives this time appear to be entirely selfless.

Re:What NPM should do to stop a new colors attack by spankalee on Monday January 10, 2022 @07:48PM (#29885507)
Just because the package owner had implicit permission to run code on other people's machines, doesn't mean that this wasn't an attack.

A postal carrier may have a key to a building to deliver mail, but if they use it to turn on all the faucets and leave the doors open, it's an attack.

Re:What NPM should do to stop a new colors attack by alar44 on Tuesday January 11, 2022 @01:46AM (#29888379)
That's exactly backwards. He wasn't granted permission to run code on other people's machines, he granted other people the right to run his code on their machines!

Wow!

Re:What NPM should do to stop a new colors attack by stickfigure on Tuesday January 11, 2022 @01:53AM (#29888415)
There is a social contract in the world of open source. The author violated it.

If he exploited trust to steal private crypto keys, we'd have no trouble calling it an attack. The difference is merely a matter of degree.

Re:What NPM should do to stop a new colors attack by zepolen on Tuesday January 11, 2022 @02:51AM (#29888752)
> There is a social contract in the world of open source.

No there isn't. What there is however is the actual contract of the repo (MIT License):

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Listen, open source is about freedom, and the author is perfectly within his rights to freely change HIS OWN REPO as he wishes. Just as anyone is within his rights to freely FORK THE REPO.

This is open source.

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:14AM (#29888898)
> This is open source.

No, it's not.

The idea that you can waive the implied warranty of fitness for a particular purpose covers good faith mistakes or omissions. It doesn't cover intentional misrepresentations or excuse blatant fraud and criminality. For instance, if you sneak in a ransomware package, it's not "all good folks" because "there's no warranty, it's my repo and you can munch on my nuggets."

The author offered something to the community on certain terms and made certain representations. The author then decided that they had sellers remorse, and instead of acting like a professional adult who realized they made a poor investment (and finding a new maintainer), they threw a tantrum and decided to try and stick it to "the man" by violating the representations they previously made to the community as a whole.

This was petty, petulant and in bad faith. Does it rise to the level of criminality? It might, IANAL though. Nobody's going to go after them because it was more immature than truly harmful.

Re:What NPM should do to stop a new colors attack by krageon on Tuesday January 11, 2022 @07:32AM (#29890748)
Perhaps it would help if you took a step back and realised you are demanding something from someone who volunteered to let you have some of their work with no guarantee other than that you'd get the work.

There was a time where we'd say "yes, this is cool. I'll use it" and we moved on. Now you can't publish something online without an army making frankly toxic demands on your time because they feel there is something wrong with what you made.

The attitude you are displaying right now is the one that birthed CoCs and the various other straitjackets that we use these days because folks have lost the ability to tell a toxic community to go jump in a lake when they make demands they shouldn't. And it is a shame, because the permissive and open climate is what makes open source: If you don't like it, you fix it.

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:33PM (#29897421)
> Now you can't publish something online without an army making frankly toxic demands on your time because they feel there is something wrong with what you made.

Asking you not to intentionally break a package you know 20,000+ products rely on as a result of your representations hardly seems like a toxic demand on their time. They hadn't committed to the project in over three years. All they had to do was continue not committing to it.

Asking them to find a new maintainer or not intentionally wreck other people's work that relies on it isn't a toxic demand, it's asking for a modicum of respect.

I'm not saying you have to keep building sandcastles, im saying if you decide to stop for whatever reason its not a toxic demand to ask you not to knock over 20,000 other sandcastles on your way out - out of spite.

This feels like a clear case of stupid games -> stupid prizes.

Re:What NPM should do to stop a new colors attack by zepolen on Tuesday January 11, 2022 @05:21PM (#29899009)
That analogy needs rephrasing, the OP built a sandcastle and left instructions on how to build it which 20,000 other people used to build (their own) sandcastles.

Then the OP decided to make a new change for his own castle.

"Draw a vulgar expression on the front door."

Which 20,000 people blindly copied and then have the audacity to complain about.

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @07:59PM (#29900908)
It's not audacity to use a piece of software in the way it was made available on the terms under which it was made available. What is audacious is simply rugging everyone that took you at your word.

[edit] To be honest you're not even advocating for a coherent model of open source software. Should everybody consuming every library fork it in case the author throws a tantrum? That hardly seems workable. The author didn't just stomp on big company sandcastles, the author knocked over everyone's. Every pet project, every startup getting off the ground.

For what? Sellers remorse. Author wrote something and gave it away, then regretted giving it away. Sorry.

Re:What NPM should do to stop a new colors attack by zepolen on Tuesday January 11, 2022 @11:27PM (#29902296)
> Should everybody consuming every library fork it in case the author throws a tantrum?

Yes you should always fork open source projects critical to your project that are not mirrored somewhere safe, you never know when they may be inadvertently deleted, that's just common sense.

For dependencies, simply pin your versions and put library upgrades through a code review, that way no unknown code enters your system. Or just wait a couple days after a new release, the shit will hit the fan from all the incompetents.

> That hardly seems workable

Right, no one wants to do the work.

> For what? Sellers remorse. Author wrote something and gave it away, then regretted giving it away. Sorry.

For what? Buyers remorse. You blindly pulled code without looking at it, then regretted pulling it. Sorry.

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @11:56PM (#29902506)
> For dependencies, simply pin your versions and put library upgrades through a code review, that way no unknown code enters your system.

These are all solid recommendations but don't excuse shit behavior on behalf of certain poor participants in the ecosystem. Which it seems you're super eager to do for some reason.

> Right, no one wants to do the work.

I mean so far it looks like one guy lol.

> For what? Buyers remorse. You blindly pulled code without looking at it, then regretted pulling it. Sorry.

We're talking about this guy's motivations not that of the consumers.

Re:What NPM should do to stop a new colors attack by zepolen on Thursday January 13, 2022 @02:10AM (#29917721)
> don't excuse shit behavior on behalf of certain poor participants in the ecosystem

Why not? You are excusing the incompetence of everyone affected by this.

Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @03:39AM (#29889037)
It's not a ransomware package and drawing upon metaphors like this is poor reasoning. I suggest you read some Dijkstra on this idea of "medieval thinking."
Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:40AM (#29889046)
[edit] The point I was making is not that the author committed a ransomware package (or even that it is a good analogy) but that the idea there is a blanket waiver of warranties that covers whatever you wish it to by virtue that it is yours is trivially falsifiable.
Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @03:42AM (#29889057)
Sorry, I can't continue a good faith argument with someone who defines this as malware. It's delusional.

I won't edit my comment above except to note what the original parent comment was:

" The author committed malware to a package many relied on, that they had not made a commit to in 3 years. My point is not that the author committed a ransomware package but that the idea there is a blanket waiver of warranties that covers whatever you wish it to is trivially falsifiable."

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:45AM (#29889072)
You are correct that calling it malware is borderline - it was malicious software designed to cause harm or nuisance (to some degree) for users. However, I have amended my comment to for clarity of intent.

The definition of malware for the record is:

  ...  software that is specifically designed to disrupt, damage, or gain unauthorized access to a computer system.
Seems close to me, the modifications were designed to disrupt the users of this package. This is not strictly relevant.
Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @03:51AM (#29889106)
All I want to say is that if accepting your argument as 100% true, then corporations have done much worse with software end users have actually PAID for. Yet, this same community that holds this developer of software that is free is held to a higher standard they don't apply to their own commercial projects.
Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @04:00AM (#29889163)
Out of curiosity do you have some examples where customers paid for a library, and then the author of that library decided they disliked the terms of the arrangement and injected some code to make it non-functional demanding nebulous payment? Or worse?

I suspect not, because they would be sued into the dirt for breech of contract and shortly find themselves out of business. In fact I believe the customers could even sue for specific performance and force the seller to actually execute the contract as committed.

It's not that I hold free software to a higher standard, I hold folks to the standard they committed to. The author had big sellers remorse, upset that they had offered this software free of charge. I'm sorry, we all make decisions we regret. If they didn't want to maintain it anymore they could have found a new maintainer. Instead they decided to mess with the computers of people who accepted their representations.

Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @04:19AM (#29889283)
Sure, How about Google borking a user's device with OTA updates and then telling users to go pound dirt with their silence?

https://9to5google.com/2015/04/10/nexus-5-nexus-7-bricked-an...

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @04:33AM (#29889385)
That appears to be (a) unintentional, which is a critical distinction (b) 7 years ago and (c) if the comments section is to be believed, resolved by calling Google up, explaining the situation and receiving a complementary warranty extension.

  To their credit they stood behind it. Mine was repaired, FREE (October 2015)
The delay was, more than likely, simply that big companies move slow. This is not the same thing.
Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @12:34PM (#29894669)
Point A is a simplification. Point B is irrelevant. If you think it's bad it doesn't matter when it's done. Or will you say that in a few years what you think is bad that this developer has done is no longer bad? This is flawed reasoning. Point C you're sugar coating it. He initially was denied and given the run around and only after making a sufficient fuss was he deemed worthy of a warranty extension. How many others weren't? It's the same thing in american healthcare where insurance companies will "Accidentally" deny coverage a few times for certain things just to get the less persistent people to give in and not bother fighting for what they're owed.

But here's the real context on Point A since you don't want to actually look into it further and most outlets aren't going to bother doing it either. Once Google realized what was happening, well, it kept happening. They were pushing these OTA updates in some cases with 0 user intervention. Not to mention you're taking the comments out of order. That specific commenter had his device bricked multiple times. Why don't you quote that part of his dialogue?

Maybe you should ask why devices would be bricked in the same way multiple times?

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:27PM (#29897351)
I'm sorry but there's no comparison between mishandling a bug causing an issue for customers unintentionally, and intentionally nuking all your customers from orbit with a malicious commit because you threw a temper tantrum. There's a ton of good ways to handle this. Find a new owner, for instance.
Re:What NPM should do to stop a new colors attack by dse1982 on Tuesday January 11, 2022 @08:45AM (#29891364)
Re:What NPM should do to stop a new colors attack by hansvm on Tuesday January 11, 2022 @08:36AM (#29891281)
It happens all the time.

Some anecdata: When Garmin bought Navionics they cancelled everyone's paid lifetime licenses, pushed updates demanding logins (worse in this case than others because 99% of the places you'd use their software have shitty internet, so an intermittent login wall is a bit crippling even if it were free) and monthly subscriptions, and hounded every negative review saying that they were doing it for the users' own good. Could a person sue for $19.99 and not have corporate lawyers juggle you between headquarters in Kansas and Italy? Maybe, but it's a pain in the ass for minimal gains.

Re:What NPM should do to stop a new colors attack by zepolen on Tuesday January 11, 2022 @03:24AM (#29888957)
You should have been on the internet a couple decades ago, you'd have hated it (and we'd all have laughed at you.)
Re:What NPM should do to stop a new colors attack by 1_player on Tuesday January 11, 2022 @05:15AM (#29889635)
I don't think you remember how the internet was 20 years ago very well to make a statement like that.
Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @03:36AM (#29889022)
Thankfully, most of the community has matured in the interceding decades.
Re:What NPM should do to stop a new colors attack by zepolen on Tuesday January 11, 2022 @04:11AM (#29889225)
Actually, most of the community no longer spends their time here, but of course you wouldn't know about that, you are not invited.
Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @04:36AM (#29889399)
If it's a community of folks who release open source projects, see their success, then throw tantrums I mean, that doesn't sound like a loss to me. I'm happy that y'all were able to build a community on common foundations and I wish you the best of luck!
Re:What NPM should do to stop a new colors attack by Kavelach on Tuesday January 11, 2022 @03:14AM (#29888904)
At first, I upovted zepolen's comment about there being no social contract, only license, but something bugged me about that, and I felt that I wasn't right.

After thinking about it for a while, I think that you are right, there is an implicit social contract when using open source software, and a part of this contract would be to expect the maintaining people to provide the best quality software they can create.

But the thing about contracts is that they work between multiple parties, and not just the maintainer(s) and some void. And consumers of the library didn't do their due diligence, that is, supporting the code that they rely on.

Re:What NPM should do to stop a new colors attack by ethanwillis on Tuesday January 11, 2022 @03:33AM (#29889003)
Best quality in what regard and to whom? Software in its purest form is for self expression which is exactly what he is doing. He never explicitly intended this software for commercial usage. And in a non-commercial setting his changes aren't even close to being deemed harmful.
Re:What NPM should do to stop a new colors attack by BoorishBears on Tuesday January 11, 2022 @11:07AM (#29893208)
> And in a non-commercial setting his changes aren't even close to being deemed harmful

So you don't even know what happened?

There's an infinite loop after it finishes printing garbage. It's an unquestionably harmful change.

Also, you know how you prevent non-commercial use?

https://github.com/Marak/colors.js/blob/master/LICENSE

-

I don't get it, Marak is clearly having some sort of episode*, and people are bending over backwards to rationalize the result as if there's some clear connection between his intent and his actions.

How many people realize he made those anti-commercial comments two years ago. Right now it actually seems like his comments were more political than financial.

* I don't mean that in a backhanded way, based on his history and his recent comments I think this is someone who needs help regardless of his actions on NPM*

Re:What NPM should do to stop a new colors attack by kderbyma on Tuesday January 11, 2022 @01:45PM (#29895803)
it's art. I like the idea of occasionally writing to my fans....:D
Re:What NPM should do to stop a new colors attack by rak1507 on Tuesday January 11, 2022 @03:44AM (#29889069)
lol do you actually think people care about providing the 'best quality software they can create' https://www.npmjs.com/package/is-even etc
[dead]
Re:What NPM should do to stop a new colors attack by stickfigure on Tuesday January 11, 2022 @06:28AM (#29890128)
I live in a world in which you get banned from Github, NPM, and possibly other communities for violating that "imaginary" social contract.
Re:What NPM should do to stop a new colors attack by rakoo on Tuesday January 11, 2022 @07:05AM (#29890518)
All centralized platforms, with the inherent issues that have been analyzed for decades already. Continuing to use them and complaining of those issues doesn't make any sense at this point.
Re:What NPM should do to stop a new colors attack by stickfigure on Tuesday January 11, 2022 @10:08AM (#29892289)
Who is complaining? I'm glad this guy got booted out of these (relatively) high-trust societies.
Re:What NPM should do to stop a new colors attack by alar44 on Tuesday January 11, 2022 @02:12AM (#29888518)
Merely a matter of degree? There is a chasm between stealing data and printing nonsense to stdout.

That's like saying getting all your limbs cut off is technically a flesh wound and the only difference between that and a papercut is the degree of the wound.

Re:What NPM should do to stop a new colors attack by irfanka on Tuesday January 11, 2022 @04:46AM (#29889455)
Well... yes. That's exactly what "degree" means.
Re:What NPM should do to stop a new colors attack by krageon on Tuesday January 11, 2022 @07:29AM (#29890711)
Yes, but you wouldn't use it in this manner in a good-faith conversation.
Re:What NPM should do to stop a new colors attack by krageon on Tuesday January 11, 2022 @07:28AM (#29890709)
> There is a social contract

No. You use what they wrote because they allowed you to. It is not then their responsibility what you do with it or how things inconvenience you. It is up to the user to vendor the dependencies and make sure everything works the way it should.

> The difference is merely a matter of degree.

In the same way that using your front door to break someone's nose on purpose and someone skinning their knee on an unfortunately placed step in your garden is different degrees of assault, sure (i.e. it's not and the only way in which it is is pedantic and not useful).

Re:What NPM should do to stop a new colors attack by Macha on Tuesday January 11, 2022 @01:59PM (#29896046)
> No. You use what they wrote because they allowed you to. It is not then their responsibility what you do with it or how things inconvenience you. It is up to the user to vendor the dependencies and make sure everything works the way it should.

There is also no obligation for you to use or distribute newer versions, even if you are NPM.

Re:What NPM should do to stop a new colors attack by ratg13 on Tuesday January 11, 2022 @02:07AM (#29888489)
This still leaves the elephant in the room: who decides when this line has been crossed?
Re:What NPM should do to stop a new colors attack by thirtyseven on Tuesday January 11, 2022 @04:12AM (#29889237)
I think the organizations that spend tons of money to run the central repositories we all use are a good candidate for that.
Re:What NPM should do to stop a new colors attack by rakoo on Tuesday January 11, 2022 @07:34AM (#29890765)
I would have said it's the organization that earn tons of money and don't give a cent to developers if they can avoid it who should think about the structure they have created and profited from and now realize open source doesn't exist in abundance like air.
Re:What NPM should do to stop a new colors attack by toxik on Tuesday January 11, 2022 @03:08AM (#29888861)
Intent is what matters, was it meant as an attack - and it kind of was but Joe Developer Schmoe really just got caught in the crossfire of some guy who watched Mr. Robot one time too many.

To answer your question directly, I think the jury’s still out and it will depend on the repercussions. So far it seems to have been a nuisance at worst.

Re:What NPM should do to stop a new colors attack by jzb on Monday January 10, 2022 @08:36PM (#29885975)
He didn’t, though. People signed up to a distribution method to run the code and just assumed future updates would be okay. He didn’t push the code to them, they pulled it.
Re:What NPM should do to stop a new colors attack by PragmaticPulp on Monday January 10, 2022 @10:08PM (#29886896)
People didn't actively go seek out a new version.

He intentionally abused semver to disguise it as a safe update, when it was not.

I know it's popular in programming/infosec to blame the victim for trusting anyone, but you can't deny that this it's common behavior among many (though not all) projects to use the caret prefix when specifying dependencies because you trust the package maintainer to honor the semver agreement.

Re:What NPM should do to stop a new colors attack by shepherdjerred on Monday January 10, 2022 @10:52PM (#29887306)
It's his project. It's a free, open-source project. What does the maintainer owe us? Absolutely nothing.

> I know it's popular in programming/infosec to blame the victim for trusting anyone, but you can't deny that this it's common behavior among many (though not all) projects to use the caret prefix when specifying dependencies because you trust the package maintainer to honor the semver agreement.

Be thankful that all he did was spam the console. It could have been something more malicious. Updating dependencies without auditing source code is a very common practice, but that doesn't mean it's not the victim's fault. It is unrealistic to audit the insane amount of source that our projects are built on, but that is the exact tradeoff that we're making in exchange for the productivity of not building libraries ourselves or paying for those libraries.

Open source is something that we're gifted not something that we're owed. If you disagree, then feel free to either use exclusively proprietary software where you can have expectations of the maintainer, or build all of the functionality that you need by yourself.

Re:What NPM should do to stop a new colors attack by afiori on Tuesday January 11, 2022 @03:38AM (#29889035)
I think that open source developers still owe us not to maliciously run malware on our machines.

To be clear they do not owe us to produce good code, or to keep producing code, or to produce the code we want; it is remarkably close to charity giving: the developer/mantainer is donating their work/code to the community.

Just like charity you should not give poisoned gifts.

The kid that gave homeless people oreos with toothpaste filling wasn't charitably offering food to someone in need, he was maliciously offering them a "poisoned" gift.

Re:What NPM should do to stop a new colors attack by rakoo on Tuesday January 11, 2022 @07:12AM (#29890576)
Open source developers don't owe anyone anything. It's this entitlement that has led so many of our fellow people in the community all the way to depression. Stop expecting something when it was explicitly stated that software is provided with no guarantees.
Re:What NPM should do to stop a new colors attack by afiori on Tuesday January 11, 2022 @08:52AM (#29891419)
My point is different: People owe everyone not to maliciously inject malware on their machine, it is irrelevant whether you are an open source developer or not.

The author published the packages to a public registry with the expectation that the code would be run by others, it was not just a random github project, it literally invited others to run the code by being registered on npm.

The author explicitely offered no warranty on the code, but distributing malware is both illegal and against npm ToS.

Being an open source developer does not put you above ethics.

The only thing that would change this would be if some third party was mirroring their code on npm without the author consent.

Re:What NPM should do to stop a new colors attack by oauea on Tuesday January 11, 2022 @09:00AM (#29891511)
If you choose to download my code and include it in your project and it doesn't do what you expect, that is on you.

The colors library has an infinite loop and you shipped that version to your end users? That's on you. Test and pin your dependencies. Not doing so is the true offense. Be upset with AWS and the likes who will run unvetted third party code on your machine.

Also note that an infinite loop is not malware. Implying such is insane. Are you now going to call every piece of crashing software malware?

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @11:30AM (#29893637)
People are going to include the code in question mostly via transitive dependencies. Creating an app with create-react-app will lead to at least 2000+ such dependencies. That's just how the entire npm ecosystem works, and so there is certain community wide expectations not to do this sort of thing, and when it does happen, have mechanisms in place to contain the damage. I agree that people should reassess their exposure to such a ecosystem but that is besides the point.

I believe this is akin to not driving dangerously on the road. There is obviously a social contract. This what living in a society is all about. Just because someone can do something doesn't mean we can't expect otherwise.

His work benefited from the work of many other people who also released open source software. That not only includes the packages that he released, of which he had other contributors, some of which actually wrote more of the package than he did (colors.js) as well as packages that he more or less did a direct port from (faker.rb and CPAN::faker). He also benefited from the entire npm/node ecosystem.

People have every right to be pissed.

Re:What NPM should do to stop a new colors attack by afiori on Tuesday January 11, 2022 @10:43AM (#29892818)
> If you choose to download my code and include it in your project and it doesn't do what you expect, that is on you.

Completely agree.

But the key concept that keep avoing is malicious intent.

Let's make an analogy in a completely different topic: Are (D)DoS attacks wrong? do people owe us not to (D)Dos our machines?

On one hand we connected our machines to the internet and declared ourself as ready to accept incoming traffic; on the other hand spinning up a bot army to render said machines unsusable is not nice.

Is it correct to say that you should have some kind of (D)DoS pretection on your services? yes. Is it also correct to say that people should refrain from crapping on other people stuff? also yes.

Getting back on topic; there is possibly a solid case to argue that this was not criminal (as no unauthorized "access" happened) but as much as open source volunteers should be more appreciated the "don't intentionally damage stuff with the SOLE intent of damaging stuff" is something expected of any human regardless of their social position.

Re:What NPM should do to stop a new colors attack by oauea on Tuesday January 11, 2022 @11:28AM (#29893603)
> Are (D)DoS attacks wrong?

Yes, if you attack infrastructure that you do not have permission to test. Here people downloaded code, ran it on their own infrastructure (or worse: shipped it to their users!) and were surprised this code did not do what they expected.

So, the only malicious actors here are those who shipped the package to their end users. Not the developer, they did not ship the code to anyone. They simply released a new version that other people chose to download and include in their own work.

To be clear, it's a total dick move and I don't support it at all, but the real blame should go to those who blindly download such code and run or redistribute it.

Re:What NPM should do to stop a new colors attack by shepherdjerred on Tuesday January 11, 2022 @01:38PM (#29895685)
I totally agree.

We need better tools to prevent things like this from happening again because nobody is ever going to audit the 2000 dependencies of every new create-react-app release.

Re:What NPM should do to stop a new colors attack by shepherdjerred on Tuesday January 11, 2022 @01:41PM (#29895749)
> I think that open source developers still owe us not to maliciously run malware on our machines.

The open source developer didn't run anything on your machine. You ran it on your machine. The developer published code. Others blindly pulled the update, and that propagated.

Re:What NPM should do to stop a new colors attack by sakarisson on Tuesday January 11, 2022 @03:05AM (#29888840)
> Be thankful that all he did was spam the console.

Why would I be thankful for that?

If you slap me, should I be thankful that my nose wasn't broken?

Re:What NPM should do to stop a new colors attack by jzb on Tuesday January 11, 2022 @10:30AM (#29892610)
If nothing else, he illustrated a point that many people needed made. They got off cheap - he didn't exfiltrate data, install malware or whatever. He showed that their supply chain is insecure, and that they are trusting way too much in the kindness of unpaid strangers.

If your business or development practices depend on pulling a bunch of packages from NPM or other sources un-audited and so forth - especially straight into production! - you need to seriously rethink things. You got off relatively light, this time, if you were impacted by this.

Re:What NPM should do to stop a new colors attack by baq on Tuesday January 11, 2022 @03:26AM (#29888973)
Fool me once… etc.
Re:What NPM should do to stop a new colors attack by alex_sf on Monday January 10, 2022 @11:30PM (#29887559)
> People didn't actively go seek out a new version.

When they set their dependency versions to 'latest', that's exactly what they are doing.

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @02:07AM (#29888486)
however, I think the more common case is that they set it to the latest bounded by a minor or patch version (as opposed to a major version) as defined by semvar.

at least that seems to be quite common in the npm/js world.

Re:What NPM should do to stop a new colors attack by oauea on Tuesday January 11, 2022 @08:57AM (#29891485)
> People didn't actively go seek out a new version.

They did. They chose not to pin their dependency versions, so this is their clear explicit choice. They also chose not to test their dependency updates before pushing it through to their end users, pure negligence by e.g. AWS who was affected by this.

Re:What NPM should do to stop a new colors attack by rakoo on Tuesday January 11, 2022 @07:15AM (#29890599)
> People didn't actively go seek out a new version.

Yes, they did. Have you read the article ? That's how npm works: it always pulls the latest version.

You can't use tools you don't understand and blame someone else if it doesn't work as you expect it to.

Re:What NPM should do to stop a new colors attack by PragmaticPulp on Tuesday January 11, 2022 @11:26AM (#29893562)
> Yes, they did. Have you read the article ? That's how npm works: it always pulls the latest version.

No, it pulls the specified version.

The affected packages fixed it by removing the leading carpet in the version specifier, which was designed to allow patch version bumps for things like security fixes.

He literally abused the versioning system designed to allow security fixes by introducing a breakage and disguising it as a non-breaking change.

Re:What NPM should do to stop a new colors attack by tasha0663 on Monday January 10, 2022 @10:09PM (#29886914)
There's a thread on the "zalgo" issue on GitHub where he's being a jerk. And he has a sizeable past history of jerkdom. Don't blame the victims that the well was poisoned, blame the jerk who poisoned it.

Do I really think he's a jerk? No, I think he's unwell. Previous headlines, lots of conspiracy theory posting recently, now this. He needs help.

Do I think this is an attack? We call other exploits attacks. The shoe fits. This was a deliberately hostile act.

Re:What NPM should do to stop a new colors attack by brigandish on Tuesday January 11, 2022 @12:54AM (#29888092)
> Don't blame the victims that the well was poisoned, blame the jerk who poisoned it.

Why are they drinking from someone else's well? Someone with "a sizeable past history of jerkdom"?

If you can check the water - nay, if you can copy the water and check it, and create an identical well from that water so that said jerk may never interfere with it again - then the "victims" have no one to blame but themselves.

If he had poisoned other people's wells you might have a point. He didn't, in the same way that poisoning the water I keep in my fridge is not an attack on anyone else. Why do you trust the water in my fridge without checking it?

Re:What NPM should do to stop a new colors attack by anhner on Tuesday January 11, 2022 @07:08AM (#29890541)
> Why are they drinking from someone else's well?

Because the well said "free water". And in some cases it's not even them taking water from that well, but other people who they asked to bring them tea (third party libraries).

> Someone with "a sizeable past history of jerkdom"?

Do you really dig through the internet history of every maintainer of every package you ever used?

Re:What NPM should do to stop a new colors attack by brigandish on Tuesday January 11, 2022 @08:41AM (#29891318)
> Do you really dig through the internet history of every maintainer of every package you ever used?

No, because that would be impossible but I do try to check the libraries I use to the best of my ability, the same with browser extensions I install. I even read the ingredients on things I buy. Sometimes I read the instructions on drugs I'm prescribed.

The perfect is the enemy of the good, after all.

Re:What NPM should do to stop a new colors attack by krab on Tuesday January 11, 2022 @08:19AM (#29891121)
In fact, it said "free water without implied fitness for a particular purpose".
Re:What NPM should do to stop a new colors attack by lolinder on Monday January 10, 2022 @08:39PM (#29886000)
He did what he did knowing full well that people would end up downloading and running that code. By your same reasoning you could argue that websites distributing malware aren't pushing viruses to people, people are coming to them and pulling the virus onto their computer.
Re:What NPM should do to stop a new colors attack by hackmiester on Tuesday January 11, 2022 @02:10AM (#29888504)
Microsoft may have the right to host and distribute this person’s code, but if they use it to take over the package and make decisions on the author’s behalf, it’s an attack.
Re:What NPM should do to stop a new colors attack by kristjansson on Monday January 10, 2022 @11:08PM (#29887406)
A package isnt even implicit authorization to run arbitrary code on other peoples machines. It’s authorization to run a specific, known version of your code, preferably one that others are also using without incident.

That’s the whole point of TFA: this is a design flaw in NPM, a package author shouldn’t be able to have the impact this event did, regardless of how popular their package is.

Re:What NPM should do to stop a new colors attack by xvector on Monday January 10, 2022 @08:06PM (#29885676)
It's still his project. He could have deleted it for all I care, it's his every right.

I wonder if GitHub/NPM even have the legal rights to modify the code you publish, depending on your license.

Re:What NPM should do to stop a new colors attack by lolinder on Monday January 10, 2022 @08:42PM (#29886022)
Deleting it would have been less offensive because deleting it would simply have caused his code to stop executing on other people's machines altogether. What he did instead was execute malicious code (albeit a relatively benign malice) on the computers of people who previously trusted him.

Deleting the package is within his rights. Modifying the package to be abusive may technically (legally) be within his rights but is certainly not ethical, and I'm not even convinced that it was legal. Had he modified the package to install a Bitcoin miner instead of just breaking apps, I suspect he'd be breaking the law, and it's not obvious to me that a DOS attack should be treated differently.

Re:What NPM should do to stop a new colors attack by xvector on Monday January 10, 2022 @08:57PM (#29886215)
> Modifying the package to be abusive may technically (legally) be within his rights but is certainly not ethical

Of course it's not ethical. But, publishing whatever code he wants under his name, under his projects, is well within his rights.

We are setting the precedent that users can modify the code you've published under your own name, if they don't like what you've done with it.

That is not acceptable. My users should not have hegemony over my project. They can decide to fork, they can decide not to use it. But under no circumstances should they be able to edit my project under my name.

Because that's also unethical.

> I'm not even convinced that it was legal. Had he modified the package to install a Bitcoin miner instead of just breaking apps, I suspect he'd be breaking the law.

I really doubt this. People are choosing to run his code, and choosing to update to whatever new code he publishes, regardless of the contents.

It's not like he's forcefully installing his code on anyone's machine. By enabling automatic updates of his package, developers have implicitly granted him permission to run whatever he would like on their machine.

Unethical, sure. But perfectly legal.

Re:What NPM should do to stop a new colors attack by e1g on Monday January 10, 2022 @09:23PM (#29886491)
Most people had no idea they even use colors.js as it’s used by some dependency of some dependency. For example, anyone installing AWS CDK afresh would be unable to deploy their infrastructure - it uses colors.js, which blocks the CPU as soon as it’s require’d deep in the stack. With that rug pull, the library author intended, designed, and successfully accomplished a Denial of Service move against all those people.
Re:What NPM should do to stop a new colors attack by brigandish on Tuesday January 11, 2022 @01:04AM (#29888139)
> Most people had no idea they even use colors.js

Why is that? Do NPM package managers not create a lock file that is a text file anyone can peruse?

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @02:10AM (#29888501)
yeah, it's just nobody reads every package in that file.

apps generated via create-react-app have more than 2000+ transitive dependencies.

Re:What NPM should do to stop a new colors attack by syshum on Tuesday January 11, 2022 @03:29AM (#29888990)
That is a design problem of npm and really the nodejs dev community in general.

They (you) are Blaming the dev because inherent design flaws in their development methodology.

People have been pointing out this problem with npm for years and years

Re:What NPM should do to stop a new colors attack by krab on Tuesday January 11, 2022 @08:25AM (#29891182)
> Most people had no idea they even use colors.js

Isn't that the problem? That they were running a lot of code from unpaid contributors without any guarantees (as said explicitly in the license) and then blaming those contributors when something breaks?

Re:What NPM should do to stop a new colors attack by lolinder on Tuesday January 11, 2022 @09:32AM (#29891811)
Yes, it's a huge problem. But the author here is absolutely at fault for this attack.

If I leave my garage door wide open all night and a bunch of stuff gets stolen, I'll kick myself for stupidity and vow not to do it again. I'll also call the police and hope they find the perpetrator, because there was a theft.

It is true that we as a profession need to drastically rethink our approach to dependencies and also that this author acted unprofessionally and should be condemned for his actions.

Re:What NPM should do to stop a new colors attack by xvector on Tuesday January 11, 2022 @01:20PM (#29895424)
> If I leave my garage door wide open all night and a bunch of stuff gets stolen

It's more like, "I let some random guy do whatever he wants to my garage door and he decides to brick it."

Re:What NPM should do to stop a new colors attack by lolinder on Monday January 10, 2022 @09:03PM (#29886278)
> We are setting the precedent that users can modify the code you've published under your own name, if they don't like what you've done with it.

Not users of your code, platforms you distribute on, and that precedent has been rolling forward for a while now, it's not new. Even so, I don't approve of GitHub's ban, but that doesn't mean I have to endorse the author.

> People are choosing to run his code, and choosing to update to whatever new code he publishes, regardless of the contents.

This line of reasoning would suggest that the authors of malware that requires affirmative action to start running (download an exe, open a PDF, whatever) are clean and clear legally because the victim chose to run their code. How is this any different than a malicious EXE sitting on a server somewhere waiting to be downloaded? It can't just be that the victims in this case ought to have known better, because the victims in most cases of malware ought to have known better.

Re:What NPM should do to stop a new colors attack by brigandish on Tuesday January 11, 2022 @01:06AM (#29888151)
> are clean and clear legally because the victim chose to run their code

If you take a knife from my kitchen and use it on yourself that is not my fault.

If you ask me for a tissue and I provide you with a knife and tell you it's a tissue, then I have some responsibility.

Ultimately, in either case, why were you not more careful?

Re:What NPM should do to stop a new colors attack by vertis on Tuesday January 11, 2022 @08:40AM (#29891312)
I mean to strain the analogy it's more like feeding someone a sandwich and then having the ability to transmute the sandwich into a knife once they've already eaten it.
Re:What NPM should do to stop a new colors attack by brigandish on Tuesday January 11, 2022 @08:44AM (#29891350)
Did he meta-program that infinite loop? I haven't bothered to read the code… like everyone else :-D
Re:What NPM should do to stop a new colors attack by syshum on Tuesday January 11, 2022 @03:35AM (#29889014)
For me the question is was the new (breaking) functionality announced when the package was updated. It appears to me it was thus I find no issue.

This is different then software announcing on the next release they will include ads or even a crypto miner as part of revenue generation

As long as the change is announced then there is no ethical issues and if you as the dev or user fail to read the updates of your depencacy tree well that is a failing on your part

Re:What NPM should do to stop a new colors attack by arcticbull on Tuesday January 11, 2022 @04:20AM (#29889294)
> I really doubt this. People are choosing to run his code, and choosing to update to whatever new code he publishes, regardless of the contents.

Not sure that's true. The fraudulent element there would be the clear and intentional misrepresentation. If the package were represented as a Bitcoin miner, that's one thing. However, representing it as color and styling for your terminal and then mining with it, that seems illegal. Would love a lawyer to weigh in.

Re:What NPM should do to stop a new colors attack by spankalee on Monday January 10, 2022 @10:18PM (#29887003)
> We are setting the precedent that users can modify the code you've published under your own name, if they don't like what you've done with it.

Who has done this? Can you point to it?

Re:What NPM should do to stop a new colors attack by sam0x17 on Monday January 10, 2022 @09:12PM (#29886365)
The correct approach would be to allow changes like this to be pushed to _new_ versions but to lock pre-existing versions in place. The alternative is this weird world where the platforms themselves have spooky editorial control over every package and could step in at any time and lock out the maintainers (sounds a lot like SourceForge).
Re:What NPM should do to stop a new colors attack by kijin on Monday January 10, 2022 @10:57PM (#29887337)
The "alternative" is exactly what Linux distros like RHEL and Debian do. They have editorial control over every package and often make changes the original developers don't like. It seems to work fairly well as long as you don't insist on following the latest version.
Re:What NPM should do to stop a new colors attack by seoaeu on Tuesday January 11, 2022 @12:27AM (#29887933)
One mental model is that Linux distros are really just curated package repositories, with all the upsides and drawbacks that come with that. Especially regarding their dogmatic insistence that across the entire repository there's only a single (or at most several) versions of any given library
Re:What NPM should do to stop a new colors attack by prmoustache on Tuesday January 11, 2022 @07:55AM (#29890934)
Aren't developers always using the same version and blindly downloading and running malicious code doing the same thing, running a single version?

Only those were harmed. And by harmed it was just really a bunch of tests runs failing, I guess no production workload was impacted by that jerk move.

Re:What NPM should do to stop a new colors attack by sam0x17 on Friday January 14, 2022 @12:13PM (#29937110)
Right, but my point is this code, in and of itself, really isn't malicious. It's only malicious in the context of "version XYZ used to do X, now it does Y". If you make versions indelible, you eliminate the potential for this to blow up as an issue.
Re:What NPM should do to stop a new colors attack by zkldi on Tuesday January 11, 2022 @12:52AM (#29888074)
To be clear, you can't edit an existing published version of a package on NPM, nor can you delete packages (havent been able to for 5 years-ish).
Re:What NPM should do to stop a new colors attack by sam0x17 on Monday January 10, 2022 @09:15PM (#29886395)
> Modifying the package to be abusive may technically (legally) be within his rights but is certainly not ethical

Sorry to play devil's advocate here, but who are you to say that the future vision of faker isn't some text being sent repeatedly to the console? One man's feature is another man's DoS attack, and while it's clear here, there are plenty of scenarios just like this where there is no obvious solution. We should just let maintainers do what they want with packages (other than install viruses or crypto-miners), but we shouldn't let them pull or modify old versions. Otherwise everything becomes like SourceForge where the platform itself can "editorially" decide to take over projects for financial gain whenever they feel like it and that behavior becomes normalized.

Re:What NPM should do to stop a new colors attack by naikrovek on Monday January 10, 2022 @08:41PM (#29886017)
is it his right? to sabotage downstream code in revenge for not being paid for work he willingly took on knowing full well that he may never be paid?

legality is defined at the behest of societal needs. if society says something legal should be made illegal, or vice versa, then it will be.

GitHub/Microsoft chose to do the right thing for the society in the short term. in the long term, choosing a less stupid library update policy will benefit everyone AND let authors do all the "non-harmful" malevolent stuff they want.

as if this wasn't a single-point denial of service attack...

we are slowly (far too slowly) learning that our assumptions that all developers are benevolent is incorrect, and it's going to take another 2-5 instances of this kind of attack before people really start to understand why and see the danger of simply using libraries at all; especially in ecosystems like NPM where almost no one writes a single line of code on their own if it can instead be pulled in as a library dependency. this attitude is the exact opposite of a secure code approach and until people learn this, and learn it well, this kind of attack will continue, and the time between the attacks will gradually shorten.

Re:What NPM should do to stop a new colors attack by heavyset_go on Monday January 10, 2022 @09:17PM (#29886421)
> to sabotage downstream code in revenge for not being paid for work he willingly took on knowing full well that he may never be paid?

Some consumers of his project chose to use his 3rd party dependency in their code for free knowing full well that it could disappear or break at any time, and yet they still chose not to mitigate those risks they chose to take on.

Re:What NPM should do to stop a new colors attack by naikrovek on Monday January 10, 2022 @10:42PM (#29887211)
yes, that is the other half of the coin: don't run code if you don't know what it does.

an extreme version of that: don't use libraries at all.

I am trending more and more to this extreme as I age, because people aren't learning their lesson, and the npm ecosystem keeps biting them over and over...

Re:What NPM should do to stop a new colors attack by chaostheory on Monday January 10, 2022 @09:25PM (#29886511)
"we are slowly (far too slowly) learning that our assumptions that all developers are benevolent is incorrect, and it's going to take another 2-5 instances of this kind of attack before people really start to understand why and see the danger of simply using libraries at all"

I agree, but at the same time if we had this mindset earlier; open source probably wouldn't have caught on as quickly. Maybe it wouldn't have become mainstream?

Re:What NPM should do to stop a new colors attack by seoaeu on Tuesday January 11, 2022 @12:29AM (#29887946)
Honestly, it is kind of surprising we've gotten this far assuming that basically all open source maintainers aren't malicious
Re:What NPM should do to stop a new colors attack by raesene9 on Tuesday January 11, 2022 @03:26AM (#29888974)
Unfortunately I don't think that 2-5 instances of this will produce any change.

We've seen more than that number of actual malicious package takeovers in the last couple of years and it has produced basically no real change.

heck I did a talk describing this kind of attack 6 years ago and I found prior instances when researching that talk...

Re:What NPM should do to stop a new colors attack by xvector on Monday January 10, 2022 @08:52PM (#29886155)
Should your users have control over the code you publish under your name?

Because that is the precedent we are setting here.

Re:What NPM should do to stop a new colors attack by fault1 on Monday January 10, 2022 @11:14PM (#29887454)
Did he own this code? Colors.js had plenty of other contributors, and there was no CLA involved.

github user "DABH" actually had more lines of code than marak did: https://github.com/Marak/colors.js/graphs/contributors

npm and github both have terms of service that you agree to when you choose to distribute something over those systems. npm in particular has had a long policy of unrolling malicious changes to the registry of packages ever since left-pad.

Re:What NPM should do to stop a new colors attack by yifanl on Tuesday January 11, 2022 @05:26AM (#29889710)
If the responsibility lies with the maintainer, then the responsibility lies with the maintainer.
Re:What NPM should do to stop a new colors attack by Too on Tuesday January 11, 2022 @01:41AM (#29888352)
It’s not just a random personal repo on GitHub. It has a long documentation published on NPM describing the intention of the module. It is advertised as being something it now clearly and deliberately is not.

Some would even call it a genuine fraud. Doesn’t matter if you paid for it or not, there are plenty of free services in meatspace that can be compared. Free quote of bathroom renovation - plumber changes all your locks when you look away while doing the inspection.

Now should consumers be more careful about situations like this, yes. Can this guy expect to claim any rights after a move like this, no.

Re:What NPM should do to stop a new colors attack by spankalee on Monday January 10, 2022 @09:38PM (#29886638)
Why are you bringing up modifying his code? I haven't seen any indication that anyone did that.

Changing the metadata around a npm-stored package is something that npm should have every right to do. Same for changing the metadata about a GitHub project. Neither the npm registry entry nor the GitHub project settings are the copyrighted code.

Re:What NPM should do to stop a new colors attack by saghm on Monday January 10, 2022 @08:27PM (#29885890)
I mean, for almost every mainstream open source license, the answer to that is a pretty definitive "yes, they can", right? The most stringent of them require things like attribution and open source the modifications, neither of which seem like requirements that Github/NPM would have any qualms with following.
Re:What NPM should do to stop a new colors attack by xvector on Monday January 10, 2022 @08:53PM (#29886164)
But does GitHub/NPM have the right to modify his code and publish it under his account/his name? I doubt that is legal.
Re:What NPM should do to stop a new colors attack by jffry on Monday January 10, 2022 @09:29PM (#29886552)
The MIT license doesn't require NPM to list marak as the publisher of the NPM package, as long as they still obey the license's requirements.

Besides, the NPM Terms of Service are almost certainly broad enough to permit NPM to publish a modified version of a package or to delete a package.

Re:What NPM should do to stop a new colors attack by ratg13 on Tuesday January 11, 2022 @02:25AM (#29888601)
And all of the contributors to his code?

What if he had done nothing more than create the repo and the community did all of the legwork? Is it still his right to delete all of their work?

Re:What NPM should do to stop a new colors attack by xvector on Tuesday January 11, 2022 @02:29AM (#29888626)
Yes, it's his repo after all. If I let you grow flowers in my garden, it's still my right to burn it all down.

Otherwise, a multi-owner org should be used, or we need new concepts (like changes to repositories signed by multiple contributors.)

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @02:55AM (#29888775)
But with contributors, it's literally not his to "own", in terms of the actual work. Copyright law says roughly that you own the characters you type, unless you assign it to someone else.

The guy who actually wrote more of colors.js (by lines of code) than marak actually got npm to nuke the offending releases: https://github.com/Marak/colors.js/issues/317

right now they are reviewing a request to change the npm target to his repo

Re:What NPM should do to stop a new colors attack by prmoustache on Tuesday January 11, 2022 @08:33AM (#29891249)
To write and merge code to Marak's version DABH has its own copy so your question makes no sense.

Marak could decide to make his repo disappear it doesn't make the local or hosted repos of other contributors disappear. It seems that github managed to distort your mind into thinking that git was no longer a decentralized cvs.

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @11:38AM (#29893808)
I don't get your point.

The repo, gh/npm accounts and such are just metadata and metadata of metadata, which is hosted and distributed based on the terms of service of gh/npm. The thing that matters most is what the npm project points to, since it is relied on by other packages and apps.

The only thing this guy "owns", according to the law, is the copyright for the part of the codebase he wrote. Not that it matters much since it is MIT licensed.

Re:What NPM should do to stop a new colors attack by prmoustache on Thursday January 13, 2022 @05:50AM (#29919272)
> The thing that matters most is what the npm project points to, since it is relied on by other packages and apps.

And it doesn't really matter that much because the NPM people can decide to make it point somewhere else wherever they want, or people can decide to create a new package name on NPM and use that new name on their package.json file.

Re:What NPM should do to stop a new colors attack by dimgl on Monday January 10, 2022 @07:52PM (#29885550)
I don't agree with the general sentiment on this. This seems like a blatant attack to me. He went out of his way to deliberately sabotage all of the projects that depended on his. I have a few open source libraries (admittedly, not very popular) and I'd never do this. Even if I am giving the project out for free with an MIT license and are not liable for any damages.
Re:What NPM should do to stop a new colors attack by gigel82 on Monday January 10, 2022 @08:17PM (#29885794)
I'd never do this either. You and I have different ethics than this guy. We're all in agreement that's a total asshole move and no-one would be trusting him again in the OSS community, that's not in contention.

However, even assholes have rights. Didn't you ever play with neighborhood kids who take their toys and ruin everyone's fun just because they're losing? Total assholes, but still it's their shit and they can take it if they want to.

It's like me keeping a bowl of M&Ms at my desk at work to snack and let people grab a few when they pass by too, but I go on a diet and replace them with brussel sprouts one day. Don't act all butt-hurt that you're not getting your free sugar, it's my bowl and I'll put whatever I want in it.

Re:What NPM should do to stop a new colors attack by dahdum on Monday January 10, 2022 @09:54PM (#29886781)
> It's like me keeping a bowl of M&Ms at my desk at work to snack and let people grab a few when they pass by too, but I go on a diet and replace them with brussel sprouts one day. Don't act all butt-hurt that you're not getting your free sugar, it's my bowl and I'll put whatever I want in it.

I think it's more akin to lacing the M&Ms than simply swapping out for sprouts. He pushed a deliberate denial of service with the express purpose of causing harm to as many others as he could. Even joked about it in the ticket system. Knowing full well his purported target of large corporations have layers of systems in place such that would be unaffected.

I do sympathize with him, but his actions have made him appear extremely troubled, vindictive, and callous. The OSS community may yet forgive, but he shut a lot of private sector doors permanently.

Re:What NPM should do to stop a new colors attack by alar44 on Monday January 10, 2022 @11:29PM (#29887557)
Actually I think the brussel sprouts is an apt analogy. People got so used to the M&Ms they stopped looking into the bowl and just ate whatever they plucked out of it. I think that's a perfect analogy.
Re:What NPM should do to stop a new colors attack by yibg on Monday January 10, 2022 @10:46PM (#29887254)
Just because you normally leave a bowl of candy by your front door to let whoever wants to take a piece, doesn’t mean you can then poison the candy.
Re:What NPM should do to stop a new colors attack by TedDoesntTalk on Monday January 10, 2022 @08:27PM (#29885878)
> no-one would be trusting him again

I keep seeing people write this. But how would you ever know if one of your projects depended on a future package he maintains? Do you really track the authors of all packages you use against a shit list? And what if he just uses another name?

Re:What NPM should do to stop a new colors attack by jzb on Monday January 10, 2022 @08:39PM (#29886004)
And there’s the real problem: a shit ton of people/orgs don’t know what’s in the software they use/ship, and just expect people to DTRT for free, forever.
Re:What NPM should do to stop a new colors attack by gigel82 on Monday January 10, 2022 @08:33PM (#29885938)
We need to apply zero-trust everywhere. How do we know anything about anyone online? Unless it comes from a respected company, any npm project author could be a malicious actor just waiting to hit some large number of downloads to surreptitiously add a crypto-miner to it.

I think we just need to assume all of them are bad actors and review our dependencies (yes, unlikely to happen in practice given limited resources but that's a problem for someone else to solve).

Re:What NPM should do to stop a new colors attack by stickfigure on Tuesday January 11, 2022 @02:00AM (#29888452)
If the guy had installed keyloggers, or formatted drives, would you still say he's within his rights?
Re:What NPM should do to stop a new colors attack by sam0x17 on Monday January 10, 2022 @09:10PM (#29886338)
> The project's author committed a change to his own open source project, which he had every right to do.

Indeed, and it goes beyond this. I think the real implication is that software published on NPM and similar networks isn't truly free and open source, in the sense that the platform owner can and will step in and make editorial changes without the knowledge or consent of the software maintainers.

Re:What NPM should do to stop a new colors attack by kristjansson on Monday January 10, 2022 @11:11PM (#29887432)
Sure, he’s free to make new versions of it that do whatever he wants - spam zalgo, mine bitcoin, fire the mussels, whatever. That doesn’t obligate anyone to _use_ that code, nor does it obligate NPM or anyone to distribute it.
Re:What NPM should do to stop a new colors attack by sam0x17 on Friday January 14, 2022 @12:15PM (#29937133)
Nor does it give NPM permission to tamper with his code and pretend it was he who published it. I firmly believe what they did is in violation of the underlying open source license, and if it isn't, the major licenses should be updated to account for this concerning scenario.
Re:What NPM should do to stop a new colors attack by spankalee on Monday January 10, 2022 @09:40PM (#29886648)
What changes did they make to the code?

None as far as I can see.

Re:What NPM should do to stop a new colors attack by sam0x17 on Tuesday January 11, 2022 @01:23PM (#29895465)
The maintainer's intended release was text spamming the console. They replaced it with the old faker. This is changing the maintainer's code.
Re:What NPM should do to stop a new colors attack by Macha on Tuesday January 11, 2022 @02:10PM (#29896212)
> https://github.com/Marak/colors.js/blob/5152d16f22789d66e107...

So can you point me to where this license says you cannot modify this code? Or that by accepting distribution of one version of this code, you are obligated to distribute future versions?

You can't hide behind "The license doesn't say he has to play nice, so you can't complain about him not playing nice", then say it's unfair that npm don't go behind their license and TOS obligations to host his spite version.

Re:What NPM should do to stop a new colors attack by sam0x17 on Tuesday January 11, 2022 @04:00PM (#29897801)
Because they are interfering with _his_ distribution of the code. They are free to distribute it separately and make changes in those cases, but instead they are essentially re-writing history without the knowledge of the package owner, and for reasons that are largely editorial and, I think, unprecedented. They are interfering with his right to distribution, essentially. I know that in a slimy, technical way, you are correct, but I think it is relevant if at the end of the day it is practically impossible to distribute code without some unauthorized third party modifying it in transit, essentially. The implication is we need to start running our own git servers.
Re:What NPM should do to stop a new colors attack by Macha on Tuesday January 11, 2022 @05:13PM (#29898884)
I feel that replacing a package with one that doesn't fulfil the same needs in a patch update because you feel that "no warranty implied" justified it is as much "slimy, technical" use of that license.

Again, if Marak is going to rely on technicalities, I don't blame npm for treating him with as much good faith as he treated his users.

Re:What NPM should do to stop a new colors attack by spankalee on Tuesday January 11, 2022 @03:07PM (#29897080)
They changed the package metadata only by setting `latest` to point to the last non-malicious version.

Can you actually point to any code - or any package contents at all - that they changed?

Re:What NPM should do to stop a new colors attack by sigzero on Monday January 10, 2022 @08:10PM (#29885712)
Of course it was an "attack". Is doesn't matter that he owned his own packages. He knew exactly what he was doing with his changes and the effect it would have on projects that relied on his.
Re:What NPM should do to stop a new colors attack by datenarsch on Monday January 10, 2022 @08:29PM (#29885904)
It's his project. It's your fault if you blindly trust random 3rd-party code on the internet and have your mission-critical software depend on it.
Re:What NPM should do to stop a new colors attack by dathinab on Monday January 10, 2022 @09:57PM (#29886808)
> It's his project.

If you publish software you have responsibilities and no "provided as-is" clause can fully free you from it. Especially if you do so with the intention to cause harm.

> It's your fault if you blindly trust random 3rd-party code on the internet and have your mission-critical software depend on it.

The problem is not to "rust random 3rd-party code on the internet" but the "blindly" part.

Like never ever deploy without locking dependencies and testing any new dependencies before updating the lock and preferable even give the changes/diff a shallow review.

I think anyone providing programs (instead of libs) installed though npm (or "blind" untested CI builds for releases) is as much a problem as the one who caused the problems this time. Maybe even more as they also open the door for other more malicious attacks.

Re:What NPM should do to stop a new colors attack by gigel82 on Monday January 10, 2022 @11:40PM (#29887632)
> If you publish software you have responsibilities and no "provided as-is" clause can fully free you from it. Especially if you do so with the intention to cause harm.

Says who?

I can publish whatever the heck I want to my project and unless you and I have a contract that clearly defines expectations and resolutions, you're SOL.

Re:What NPM should do to stop a new colors attack by thn-gap on Tuesday January 11, 2022 @03:48AM (#29889092)
Intentions matter. The 'provided as-is' helps cover the author for unintended behaviors that are a result of some non desired bug.

You can't just update your extensively used code to add some ransomware or virus and be let off the hook because you warned users in a text file. The legal system will check what did you know and what your intentions were.

In this case, not that the author did a bad attack, but it's still a jerk move when the intention was uniquely to disrupt others and break things.

Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @02:43AM (#29888706)
Well, at least in the United States, it's the default the other way (there are implied warranties) unless licensed otherwise. That's exactly what most open source licenses do to protect the author. That being said, I could imagine in some jurisdictions, the law limits the ability for people to disclaim such warranties. It would be an interesting case.
Re:What NPM should do to stop a new colors attack by dathinab on Tuesday January 11, 2022 @01:01PM (#29895113)
> Says who?

law

EDIT: At lest in some places.

Re:What NPM should do to stop a new colors attack by leshenka on Monday January 10, 2022 @07:29PM (#29885306)
What swims like a duck and quacks like a duck
Re:What NPM should do to stop a new colors attack by kristjansson on Tuesday January 11, 2022 @01:21AM (#29888231)
He had two things: (1) the right to make and publish a change to a project he controlled and (2) a mechanism (npm and its ecosystems versioning practices) to have his changes run on thousands of machines. Making changes via (1) is not an attack. Leveraging (2) to cause ‘damage’ is without question an attack, even if the damage is just burned CI minutes and even if the victims’ comically poor practices bear some (most) of the responsibility.
Re:What NPM should do to stop a new colors attack by ozfive on Monday January 10, 2022 @07:23PM (#29885247)
Agreed on all points. People are quick to jump on someone especially when they work really hard on something and then give it away for free. Companies turn around all of the time and change their revenue model and nobody says a thing. It's their right. The guy still had the rights to do whatever he likes with the software he wrote for free. All the assholes vilifying him are shilling for corporations that didn't want to pony up to help this guy continue his work. His actions were pretty drastic, but remember he owns the rights. If he wants to delete what he owns he's in his rights and corporations better take note. You use something for free that you don't own and have no intention of compensating the people behind it you only have yourself to blame when those people rage quit. There is no real argument against this without looking like a freeloading dick.
Re:What NPM should do to stop a new colors attack by lolinder on Monday January 10, 2022 @08:49PM (#29886121)
> If he wants to delete what he owns he's in his rights and corporations better take note.

Except for that he didn't just delete the code. He added malicious code that without warning broke applications at runtime, most likely disproportionately affecting small projects that lack rigorous dependency controls.

Companies can change their revenue model, but they don't get a blank check to do anything they want. See Toyota's recent blow-up with the key fobs as a counterpoint to your argument. It's one thing to phase out support for an old product. It's quite another to yank out the rug from under people without warning, and companies don't get a pass on that anymore than this guy should.

Re:What NPM should do to stop a new colors attack by taberiand on Monday January 10, 2022 @09:47PM (#29886723)
Everyone who had code that broke due to this (and, really, everyone else too) should see it as a clear wake up call that they need to do better managing their dependencies.
Re:What NPM should do to stop a new colors attack by lolinder on Monday January 10, 2022 @09:53PM (#29886776)
Yes. Just like everyone who gets ransomware on their computers should see it as a clear wake-up call to improve their security practices. It doesn't mean we shouldn't also condemn the attack that prompted the wake-up call.
Re:What NPM should do to stop a new colors attack by chaostheory on Monday January 10, 2022 @10:06PM (#29886881)
If he just wanted people to pony up, there are plenty of other alternatives like changing the license for future versions like SugarCRM did

https://sugarclub.sugarcrm.com/engage/b/sugar-news/posts/sug...

Since he's been acquired in the past, he could also make it into a SAAS play. He has the connections, skill and experience.

Otherwise, he can just walk away like everyone else. Maliciously changing code to break people's stuff is uncalled for. If he wanted to charge people from the start, then maybe he shouldn't have used the MIT license for his code? If you want more restrictions on usage, choose a more restrictive license.

On a related note, the developer in question is not well mentally which helps rationalize what he did

https://www.qgazette.com/articles/more-charges-possible-for-...

"A team of NYPD investigators and FBI agents found potassium nitrate, which is used in fertilizer, metal containers, fuses and other bomb-making materials in the crate, along with printed bomb-making and survivalist materials and a book on how to make a bomb scattered throughout the home, the source said."

“'The chemicals separately are what they are, but taken together they can assemble an explosive device,' NYPD Dep. Commissioner of Intelligence and Counterterrorism, John Miller, said. 'There were books about military explosives, booby traps and other things.'"

Re:What NPM should do to stop a new colors attack by hnlmorg on Tuesday January 11, 2022 @04:30AM (#29889357)
I think most on here sympathise with his frustration even if they don't agree with his actions.

The real question is whether you believe as a maintainer you have the right to do whatever you want to your code while in the knowledge that others will run it.

The emphasised part is important. I have zero issue with people writing malicious code purely out of academic curiosity but if you write in with the intention of that code propagating, as this author had done, your actions become far less sympathetic.

Re:What NPM should do to stop a new colors attack by kristjansson on Monday January 10, 2022 @11:16PM (#29887463)
Sure, he can do that. But everything else is released under an open source license. Anyone that has a copy (like, I dunno, NPM) can continue to distribute whatever version of the software they want according to the terms of the license.
Re:What NPM should do to stop a new colors attack by BoorishBears on Monday January 10, 2022 @07:42PM (#29885446)
You don't get to have it both ways:

If you go by the spirit of things tanking a package and Github/MS/npm taking over to undo that is fair game. Even if it's not literally a virus, obviously damaging basic functionality to make a statement is not a sustainable practice for NPM to continue functioning

If you want to go by the letter and what legal rights someone has:

https://docs.npmjs.com/policies/conduct

> The Service administrators reserve the right to make judgment calls about what is and isn't appropriate in published packages, package names, user and organization names, and other public content. Package that violates the npm Service's Acceptable Use rules including its Acceptable Content rules will be deleted, at the discretion of npm.

https://docs.npmjs.com/policies/open-source-terms

> Your Content belongs to you. You decide whether and how to license it. But at a minimum, you license npm to provide Your Content to users of npm Services when you share Your Content. That special license allows npm to copy, publish, and analyze Your Content, and to share its analyses with others. npm may run computer code in Your Content to analyze it, but npm's special license alone does not give npm the right to run code for its functionality in npm products or services.

> When Your Content is removed from npm Services, whether by you or npm, npm's special license ends when the last copy disappears from npm's backups, caches, and other systems. *Other licenses, such as open source licenses, may continue after Your Content is removed. Those licenses may give others, or npm itself, the right to share Your Content with npm Services again.*

https://github.com/Marak/colors.js/blob/master/LICENSE

-

Seriously, why are people so adamant about defending this? We're all part of a giant ecosystem that relies on everyone being "a freeloading dick" in your eyes. Colors wouldn't have its audience without its creator being a "freeloading dick" and expecting NPM to serve it millions of times for free. NPM relies on a JS ecosystem propped up by "freeloading dicks".

"Freeloading dick" is such a dumb characterization of what it really is: Expecting FOSS creators and maintainers to be somewhat cognizant of the ecosystem past the tip of their nose.

Re:What NPM should do to stop a new colors attack by ozfive on Monday January 10, 2022 @08:04PM (#29885658)
If we are all a part of a giant ecosystem then it should be acknowledged that work has been done and should be compensated for otherwise you are just continuing to advocate for the exploitation of FOSS software without handing any compensation over for the value that it adds to this giant ecosyatem
Re:What NPM should do to stop a new colors attack by BoorishBears on Monday January 10, 2022 @10:12PM (#29886944)
Why are you replying to a statement I didn't make? Where am I saying people should not be compensated for FOSS work?

First you wrote a rant that promptly got flagged before I even had to read it... now you're putting words I didn't say into my mouth.

Are you just incapable of having a mature conversation about this subject?

-

It's becoming a little clearer what kind of mentality it takes to defend how the creator of colors handled this situation. Some of us are able to both:

- understand the frustration of feeling your work is unappreciated.

- realize there are better ways to show frustration than proverbially flipping over the table.

I mean I've literally defended this guy, Marak, before on this website, when people tried to jump to conclusions about his alleged 'bomb making'

But this is ridiculous. It's gone past compensation even, he's ranting about GamerGate and stuff and using broken packages to make political statements.

That's not a mature or effective way to do anything except yes... get yourself banned from multiple platforms for breaking the ToS you signed up for in the first place and leveraged to even get the kind of reach you have.

Re:What NPM should do to stop a new colors attack by lmm on Tuesday January 11, 2022 @12:57AM (#29888104)
"should be compensated for" - what a wonderfully passive-voiced phrase. If you don't want giant corporations using your open-source code, it's as simple as using the GPL. Of course, in that case your code probably won't get so popular in the first place.
Re:What NPM should do to stop a new colors attack by Macha on Tuesday January 11, 2022 @02:07PM (#29896177)
s/GPL/AGPL/

Plenty of SaaS providers end up using GPL code as if it was MIT since no distribution = no virality.

Re:What NPM should do to stop a new colors attack by ozfive on Monday January 10, 2022 @08:00PM (#29885620)
You are toxic and a perfect example of shilling for corporations. I bet you depend on that package and many others that you and your corporate overlords haven't paid a cent for. Deplorable at best. I donate to projects that I use as a percentage of revenue. Name more than one OSS project that your company has actually donated money to on a regular basis to ensure that it's original maintainer has some sort of compensation for the work they put in based on your usage? I bet you can't because you are more than happy to exploit things that you consider free. Defending freeloading dicks just puts you in that category.
Re:What NPM should do to stop a new colors attack by dang on Wednesday January 12, 2022 @12:35AM (#29902729)
Personal attacks like this and https://news.ycombinator.com/item?id=29885496 and https://news.ycombinator.com/item?id=29753758 are against the site rules and extremely not ok here. We ban accounts that post like that. I'm not going to ban you right now, since we haven't warned you before, but please don't do this again.

If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.

Re:What NPM should do to stop a new colors attack by ozfive on Wednesday January 12, 2022 @08:15PM (#29915494)
Fair enough dang. Will do...
Re:What NPM should do to stop a new colors attack by ozfive on Wednesday January 12, 2022 @08:15PM (#29915505)
Sorry
Re:What NPM should do to stop a new colors attack by hnlmorg on Tuesday January 11, 2022 @04:25AM (#29889319)
I think "attack" still best describes the move even if it was an indirect attack (ie he poisoned his own code then others ran it). The intention was to create a denial of service "bug" as a protest and given it was deliberate I don't think the term "bug" is sufficient. But you're right it wasn't a direct attack and I'm inclined to also agree that it wasn't intended to be malicious (though not all attacks are).

> In fact, I also take issue with GitHub / Microsoft taking over the package and am very worried about the precedent that sets, regardless if their motives this time appear to be entirely selfless.

Yeah, I agree with you here.

Re:What NPM should do to stop a new colors attack by nhoughto on Tuesday January 11, 2022 @12:13AM (#29887853)
yeah i don't see it as an attack and was very surprised Github suspended his account, less so that NPM unpublished the package. It is easy to think of these platforms as unbiased repositories, but as soon as something is deemed 'wrong' suddenly you need to think what the criteria is for that decision, who makes the decision and how? Where is the line?

Is an infinite loop is the line? Updating a package to display random text without an infinite loop is crossing the line too? Who decides what _my_ OSS library is allowed to do? Can I update it just to add a banner asking for donations? How is that functionally different to random text other than intent?

Re:What NPM should do to stop a new colors attack by zarzavat on Monday January 10, 2022 @08:11PM (#29885729)
A trojan distributed through NPM is still a trojan. It matters not whose code it was but the intention to do harm.
Re:What NPM should do to stop a new colors attack by waynesonfire on Monday January 10, 2022 @08:30PM (#29885919)
is it a "trojon" when a maintainer decides to break backwards compatibility with their next release and breaks your code? how is this any different?

Did you miss the bit in the license that states, "THE SOFTWARE IS PROVIDED "AS IS"?

when you decide to incorporate code with no guarantees into your project, you get what you get. Marak is a hero in my view to the open source community. The cost of free software is that there is nobody to point a finger at. Acts like this show-case that being able to point a finger at someone is worth something. And, maybe corps that use open-source software will begin to address this "risk" and maybe this outcome will benefit the open source community.

The "AS-IS" part is a big problem and is addressed through funding. Where, exactly what IS gets negotiated for a price.

Re:What NPM should do to stop a new colors attack by zarzavat on Monday January 10, 2022 @08:57PM (#29886216)
If it had deleted files, or extracted user password data and uploaded it to pastebin you would agree it's a Trojan, yes?

Your license agreement is not going to save you from the feds if you write code like that.

So we are arguing where the line is. From what I understand, having not run the code myself, he wrote code that put the system into an infinite loop, i.e. he intentionally caused a hang. That crosses the line in a clear way, for me.

Re:What NPM should do to stop a new colors attack by dathinab on Monday January 10, 2022 @09:48PM (#29886730)
Then it would be a crime in more or less any country.

Now the question is if it's hanging intentionally?(Software as-is) license only helps so much. Think the answer for this is not clear cut.

Without question a line was crossed.

I mean sure there are endless problems about how npm handles things, but it's more nounced.

Like e.g. you needing to go out of your way to lock dependencies instead of it being some form of defaultish behaviour is a problem.

People distributing CLI tools without having strict dependency locking is a even bigger problem/no-go.

And this showing how careless some people are when it comes to distributing software is probably the most interesting thing.

Re:What NPM should do to stop a new colors attack by bastawhiz on Monday January 10, 2022 @09:01PM (#29886250)
It wasn't backwards incompatible, it was outright designed to cause chaos. If an open source maintainer pushes an update that intentionally starts killing whatever processes it can or intentionally fills up the disk with garbage, is that not an attack? How is an update that intentionally infinite loops, printing garbage to stdout any different? There's very much someone to point a finger at: he went out of his way to cause chaos.

Does that mean corporations have no responsibility? No. But it's also the case that we live in a society and your ability to wreak havoc because you can shouldn't be empowered.

Re:What NPM should do to stop a new colors attack by chii on Monday January 10, 2022 @11:22PM (#29887506)
> a maintainer decides to break backwards compatibility with their next release and breaks your code?

a maintainer breaking backwards compatibility is not malicious.

The faker.js code is intended to be malicious, and thus should be treated differently to another project which might break your code in other ways. Because it's not about breaking code, it's about the maliciousness - the same would still apply if the faker.js trojan is more hidden, and thus was not discovered (e.g., they embed a crypto-miner into the library and extract compute resources secretly from those who use it).

Re:What NPM should do to stop a new colors attack by remram on Monday January 10, 2022 @10:30PM (#29887102)
The difference is intent. If someone makes a mistake, even if deleting all their code, that's a bug. If they intentionally make a change with no other purpose than breaking your stuff, that's an attack. The scale and whether they're successful doesn't matter.

    > attack (plural attacks)
    > An attempt to cause damage, injury to, or death of opponent or enemy.
Re:What NPM should do to stop a new colors attack by lovich on Monday January 10, 2022 @07:40PM (#29885428)
> In fact, I also take issue with GitHub / Microsoft taking over the package and am very worried about the precedent that sets, regardless if their motives this time appear to be entirely selfless.

Is there more on this? This is the first I’ve heard about this npm package being modified which I would have just ignored as regular npm problems, but hearing that GitHub took over someone’s repo sounds crazy. Does their ToS claim to override copyright or something?

Re:What NPM should do to stop a new colors attack by jffry on Monday January 10, 2022 @09:32PM (#29886572)
I do not think NPM altered a package, they unpublished the nonfunctional/infinite-loop version, so that the prior, functional, version (pushed by marak) becomes the "latest" version again
Re:What NPM should do to stop a new colors attack by gigel82 on Monday January 10, 2022 @11:18PM (#29887471)
Yes, that is a very dangerous precedent. This isn't like the leftpad issue where someone stole credentials from the project owner. This is the project owner himself publishing a new version of his project.
Re:What NPM should do to stop a new colors attack by fault1 on Tuesday January 11, 2022 @12:10AM (#29887838)
Nobody stole creds off the project owner in the left-pad incident. npm chose the needs of the many rather the few in that incident: https://twitter.com/seldo/status/712417370686365697

which seems like very much akin to what they are doing now.

Re:What NPM should do to stop a new colors attack by judge2020 on Monday January 10, 2022 @07:46PM (#29885485)
They supposedly took over the npm packages[0,1], not the github.com repos. npm is a system where you push archives as package versions, it doesn't do its own pull from a github repo or otherwise.

To add, unused/squatted npm package names regularly get reassigned[2].

0: https://www.npmjs.com/package/colors

1: https://www.npmjs.com/package/faker

2: https://docs.npmjs.com/policies/disputes#definitions

Re:What NPM should do to stop a new colors attack by zamalek on Monday January 10, 2022 @09:49PM (#29886741)
> I take issue with the title of this article.

The author wasn't mentioned in the title at all: "colors attack." Names have to come from somewhere. The article is about some hypothetical future antagonist that puts a hack/bitcoin miner in their widely adopted package, or something. "Colors attack" is just the name of, effectively, the CVE.

Re:What NPM should do to stop a new colors attack by tacone on Tuesday January 11, 2022 @03:55AM (#29889129)
I regard that as an attack, specifically a denial of service.

Whether he had the right to do so doesn't matter much, he voluntarily broke other people's apps.

Btw, I'd say that he for sure has the right to write purposely broken code, but probably not to push it on npm (it depends on npm TOS, though).

If it was for me, I would just suspend his npm account and keep distributing the existent code, since the license allows to do so.

Re:What NPM should do to stop a new colors attack by pawelmurias on Tuesday January 11, 2022 @04:32AM (#29889369)
They own the sites, they are allowed to get rid of some fuckwit.