News for hackers. Stuff that matters.
Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @12:28PM (#29878249)
He is mentally unstable. His motives are probably irrational. This is not the first time he reaches the news for strange criminal activities.

(Yes, it's his code. No, it isn't legal to maliciously add an infinite-loop to a library that you know is used by other companies. The license adds some liability protection, but it's not so simple.)

Re:What NPM should do to stop a new colors attack by _fat_santa on Monday January 10, 2022 @12:41PM (#29878453)
Personally I think he did it to prove a point. IIRC he made a post last year where he said he would no longer be developing software for companies to use for free. This gripe is that he does all this work for free and companies then use his code to make money and do not contribute back to the ecosystem.

IMO this was not the most graceful way to make the point, but at the end of the day it's his project, his code. If you want the expectation of it always working, then pay him. Don't bitch and moan that the old man giving out free bread on the steps isn't here this morning.

Re:What NPM should do to stop a new colors attack by peoplefromibiza on Monday January 10, 2022 @02:34PM (#29880551)
> he made a post last year where he said he would no longer be developing software for companies to use for free

I understand the sentiment, but why chose MIT license then?

GPL would be the right choice if one wants to stop companies profiting from free work without giving anything back.

Re:What NPM should do to stop a new colors attack by selfhoster11 on Monday January 10, 2022 @04:18PM (#29882690)
Perhaps by the time he started feeling this way, it was too late to relicense? Megacorps would just fork from a pre-GPL release and carry on.
Re:What NPM should do to stop a new colors attack by peoplefromibiza on Monday January 10, 2022 @04:29PM (#29882859)
that's my understansing as well.

I'm not judging the author here, but on one hand I understand the frustration, on the other hand the package probably owes its popularity in part to its very permissive license.

Anyway, a fork maintained by the companies that use the package would still be a better outcome than keep working for them for free (or remove the package entirely).

Re:What NPM should do to stop a new colors attack by accoil on Monday January 10, 2022 @04:15PM (#29882632)
Would GPL help though? It's a library used by tests, not part of the end product distributed to users.
Re:What NPM should do to stop a new colors attack by peoplefromibiza on Monday January 10, 2022 @04:24PM (#29882786)
I don't know in this case but in general a GPL fork must stay GPL and, AFAIUI, importing a GPL package in your code it's similar to linking to it, so if the code that uses your GPL package is published (on GH for example) that could be considered redistribution. Not sure about the legalities but it could create enough friction to keep companies not willing to contribute away.
Re:What NPM should do to stop a new colors attack by accoil on Monday January 10, 2022 @05:10PM (#29883477)
I guess I'm thinking more in terms of faker, which I believe was a library for creating test data. Makes me wonder if licenses matter much for tools that are never intended to be included in the final distribution.

Internal changes aren't going to be detectable, so it feels like the best you can hope for is that they don't want the maintenance burden of a patch set on top of your project. At that point it's not much different than MIT.

That said, AGPL would scare off most companies :p

Re:What NPM should do to stop a new colors attack by jraph on Monday January 10, 2022 @03:43PM (#29882063)
Yes, especially GPLv3. Still open source, and companies avoid it.
Re:What NPM should do to stop a new colors attack by watwut on Monday January 10, 2022 @06:02PM (#29884255)
License is pretty good starting point for that. Or, simply making closed source only as overwhelming majority of programmers do.

The whole "contributing to open source" while effectively saying "I think open source should not exist and is rip of" makes no sense in world where literally nothing forces you to create open source.

Re:What NPM should do to stop a new colors attack by ziggus on Monday January 10, 2022 @12:31PM (#29878308)
"...it isn't legal to maliciously add an infinite-loop to a library that you know is used by other companies"

Um, what?

Re:What NPM should do to stop a new colors attack by Isthatablackgsd on Monday January 10, 2022 @12:40PM (#29878436)
> No, it isn't legal to maliciously add an infinite-loop to a library that you know is used by other companies.

Could you cite an source for this? Because I got a impression that it "isn't legal" which mean it is not illegal based on your comment. I would assuming you are referring to USA Computer Fraud and Abuse Act?

Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @12:45PM (#29878517)
"18 U.S.C. § 1030(a)(5)(A) knowingly causes the transmission of a program, information, code, or command, and as a result of such conduct, intentionally causes damage without authorization, to a protected computer;"
Re:What NPM should do to stop a new colors attack by Isthatablackgsd on Monday January 10, 2022 @01:00PM (#29878755)
I agree with awinter-py, it will be tricky to use "without authorization" for this. The developer only published the code, that is up to other companies to verify the code and roll with it. If Company A installed the dependency, that could mean Company A "authorized" the code because they pulled the dependency to their system. So not sure how CFAA could protect this if the Company A proceed to download the code which in turn that the code are authorized. It is their responsibility to audit and verify the code before incorporating into their software.
Re:What NPM should do to stop a new colors attack by DangitBobby on Monday January 10, 2022 @09:26PM (#29886522)
Is it considered "authorized" if I knowingly visit a website but did not realize it would execute malicious JavaScript on my machine? Anyone who unknowingly installed this malicious package in their project is having that same problem.
Re:What NPM should do to stop a new colors attack by awinter-py on Monday January 10, 2022 @12:52PM (#29878619)
'without authorization' here is going to be tricky. author probably did have authorization to both github + npm? and didn't knowingly cause transmission to anywhere else? the rest of the steps were pull, not push.
Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @01:00PM (#29878743)
If we're honest about the US justice system, this would be a subjective decision decided by non-technological lawyers, jurors, and judges. The purposeful malicious intent is working hard against his stance.
Re:What NPM should do to stop a new colors attack by phkahler on Monday January 10, 2022 @01:20PM (#29879068)
>> The purposeful malicious intent is working hard against his stance.

OK, but should cloud providers similarly be held accountable for screwing their customers through negligent acts - to come full circle, like pulling these updates without doing any checks or QC?

Re:What NPM should do to stop a new colors attack by otterley on Monday January 10, 2022 @03:45PM (#29882113)
Although it's a different area of law, product-defect liability attaches to all actors in the "stream of commerce" stretching end-to-end from the manufacturer to the retailer.
Re:What NPM should do to stop a new colors attack by awinter-py on Monday January 10, 2022 @02:04PM (#29879912)
scotus in van buren (2020) let off a cop who was selling LPR searches for cash so in theory the days of aggressive interpretations are over? eff called it a 'victory for security researchers', though it's probably too soon to say whether it's that or just a victory for people selling LPR data
Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @03:31PM (#29881819)
The precedent doesn't apply. The SCOTUS interpreted (and in effect, defined) that the "authorized access" in 18 U.S.C. § 1030(a)(2) can't be qualified and limited to less access. If I'm authorized to see usernames, and due to light hacking I can also see emails - I'm n̵o̵t̵ ̵a̵ ̵c̵r̵i̵m̵i̵n̵a̵l̵ maybe a criminal (EDITED). If I'm authorized to check license plates for some reasons, and despite employer policy I checked license plates for some other reasons - I'm not a criminal.

The issue we're discussing here is based on 18 U.S.C. § 1030(a)(5) (note the last digit) and "authorized access" is not mentioned there at all. This section deals with damage and not access.

Re:What NPM should do to stop a new colors attack by awinter-py on Monday January 10, 2022 @04:30PM (#29882887)
hmm, not really my area. This coverage of van buren seems to show the court trying to make 'authorization' agree in meaning in different parts of (a)(2)?

https://www.natlawreview.com/article/supreme-court-ends-long...

Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @04:40PM (#29883031)
This incident has nothing to do with (a)(2) as Marak didn't _access_ any system. The only sections violated are (a)(5) (_knowingly damaging_ a system) and, arguably, (a)(7) (extortion). (a)(7) is a lot harder to argue though as his extortion attempt doesn't have a named target or an explicit demand and is generally... lame.

Edit: Note that I'm seeing this the same as a virus, not the same as a data-extraction hack.

[dead]
Re:What NPM should do to stop a new colors attack by site-packages1 on Monday January 10, 2022 @01:25PM (#29879152)
He did breach basic ethics and standards of professional conduct by his actions, for sure. I would lean against considering what he did illegal, but I think there is an argument to be made that it would be illegal under the CFAA.
Re:What NPM should do to stop a new colors attack by salawat on Monday January 10, 2022 @02:34PM (#29880546)
No he didn't, what are you smoking?

It is on the person using code to do due diligence to ensure that any code pulled down in an update is good to utilize. You're seeing an implicit obligation where there has never been one.

In general, most just have the integrity, empathy and detachment to not do what he did, however, any programmer/developer who doesn't have a checklist item of "audit that code" before updates is committing an aggriegious breach of professional ethics;as this is the exact circumstance that everyone should be on the lookout for.

Everyone here assuming there is an obligation on Marak's part to continue to provide an interface in a non-molested form for their convenience are part of the problem. You should have mirrored, or paid the man.

Re:What NPM should do to stop a new colors attack by justupvoting on Monday January 10, 2022 @12:36PM (#29878373)
Rational motives can produce irrational actions, and do so somewhat reliably.
Re:What NPM should do to stop a new colors attack by netr0ute on Monday January 10, 2022 @12:35PM (#29878356)
It can't be illegal if the software is provided as-is without any warranty as most OSS licenses do.
Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @12:37PM (#29878378)
I'll leave it as an exercise for the reader to understand the difference between "I am not liable if I have a bug that ruins your production environment" and "I am not liable if I maliciously introduce a fatal bug knowingly into your production environment".
Re:What NPM should do to stop a new colors attack by phkahler on Monday January 10, 2022 @01:23PM (#29879118)
But he didn't introduce it into any particular production environment.

For fucks sake, people need to pin dependencies to a known good version at the very least.

Re:What NPM should do to stop a new colors attack by cecilpl2 on Monday January 10, 2022 @04:00PM (#29882356)
Of course he did. Intent matters, and this was a reasonably foreseen consequence of the way the system is set up.

He knew how npm works and he knew the implication of adding that code is that hundreds of libraries and production systems would automatically upgrade and install it.

In fact, the whole point of what he did was to introduce the code into production environments.

Re:What NPM should do to stop a new colors attack by jessaustin on Monday January 10, 2022 @10:18PM (#29887006)
Raise your hand if you pull directly from the internet into production without testing!

<no hands raised>

How can we claim he did anything to production if no one will admit they're dumb enough to push this latest version without testing it?

Re:What NPM should do to stop a new colors attack by fulafel on Monday January 10, 2022 @01:00PM (#29878750)
Most of those (malice, who introduced it to your environment, fatal bug) seem contestable, even if we grant for the purpose of argument that the as-is disclaimer does not cover all cases.
Re:What NPM should do to stop a new colors attack by rsstack on Monday January 10, 2022 @01:02PM (#29878788)
Did you see the commit before it was deleted? I'd love to see a lawyer claiming anything else.
Re:What NPM should do to stop a new colors attack by fulafel on Monday January 10, 2022 @01:07PM (#29878868)
Which of the 3 claims are you referring to?

The commit is here as far as i know, not deleted: https://github.com/Marak/colors.js/commit/074a0f8ed0c31c35d1...

Re:What NPM should do to stop a new colors attack by WJW on Monday January 10, 2022 @01:26PM (#29879164)
Any reasonable expert in the field will testify that it is not possible to write an infinite loop like that unintentionally.
Re:What NPM should do to stop a new colors attack by fulafel on Monday January 10, 2022 @03:35PM (#29881914)
The commit had a comment to the effect of being test / toy code not meant to be put into a release. I don't think a claim of randomly producing the snippet would be put forward in the hypothetical court case. Then there's the question of malice vs some other motive of expression in looping and printing some ASCII / zalgo art in your own terminal art lib.
Re:What NPM should do to stop a new colors attack by salawat on Monday January 10, 2022 @02:39PM (#29880656)
Any reasonable expert in the field will tell you you don't plug an auto-updating dependency into production. Marak wrote code. You, (the consumer), pulled, and deployed it without due diligence. That is entirely on you.

Not one person is obligated to keep your crap working except you. This has really outed all the people who really should know better.

Re:What NPM should do to stop a new colors attack by marwis on Monday January 10, 2022 @04:32PM (#29882928)
If you put a bomb in a box and attach a button with a note that the button is provided as-is and author disclaims any liability, then leave it in public place and someone presses it, do you think you will not be found liable?
Re:What NPM should do to stop a new colors attack by LegitShady on Monday January 10, 2022 @09:53PM (#29886775)
if you build a car oitside in public view and someome copies it and crashes are you liable?

tbis ismt a bomb in a box its his project car you copied without any warranty or.gurantee of stability.

Re:What NPM should do to stop a new colors attack by MattPalmer1086 on Monday January 10, 2022 @07:09PM (#29885099)
No, he has no civil liability to the extent permitted by law, as the license states. He basically can't be sued.

That's different to criminal liability.

Re:What NPM should do to stop a new colors attack by Supermancho on Monday January 10, 2022 @12:38PM (#29878404)
It could be illegal (regardless of warranty or license), but it happens to not be in most of the US.