Live data from Hacker News

Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

bleepingcomputer.com

121–130 of 1001 posts

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#121
AITA for thinking that if you develop open-source software and your license permits anyone to use it for free, then complaining about no compensation is not a valid complaint?

I totally understand that billionaire corporations use software like this for free. But the software maintainer has explicitly allowed _anyone_ to use it for free. If you don't want them to use it for free, license it as such.

What am I not seeing here?

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#123

Earlier quoted context omitted.

Pin all you want, if the repo/vendor/maintainer pulls the release then you're not getting access to your dependencies at all. If anything, this is the reason you use pull-through proxies. Your proxy will hold the version you depend on, regardless of upstream drama. Keep your proxy backed up and you'll be able to use those dependencies until the end of time, or you finally decide to migrate to an alternative.

> if the repo/vendor/maintainer pulls the release If your package system allows this switch to another one, like, right now. NPM, Cargo, etc. don't allow this (they "unlist" versions, but they don't "remove" them, i.e. you can't search for them, but they are still there).

there are other benefits with proxies but fair point

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#124
post #10

Earlier quoted context omitted.

Why would the developer of any software that comes explicitly without warranty be hold responsible for downstream breakages? It's not as if one could force people to upgrade to newer versions and they can always keep depending on the old releases.

In general, warranties only relate to accidental problems and have nothing to do with intentional sabotage.

code is speech, stop listening. This is no different from a person erasing their FB history and saying something someone doesn't like.

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#125
post #67

For a bit more context: https://news.ycombinator.com/item?id=29839786 In essence, It seems to be the case of a developer getting screwed, being disillusioned, becoming political, making bombs?, attacking the ecosystem etc. Many years ago, I recall another developer of popular NPM packages(Azer Koçulu) pulling a similar thing[0]. https://qz.com/646467/how-one-programmer-broke-the-internet-... We followed each other on…

Programmers have all the power to hurt things but they rarely think about using that power. Sometimes it's not how much value you can create that wins the day, but how much pain you can strike at other people that counts. Politics is like that. Ugly, but necessary.

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#126

Earlier quoted context omitted.

> This is true for npm. After the incident with leftpad, you can't unpublish anymore. You can, however, publish a new patch update that completely breaks everything. You absolutely can unpublish, it just requires more steps. If NPM gets a DMCA takedown request they will absolutely have to fulfill it.

Except if they have reason to believe the code was uploaded with the permission of the copyright holder. The they have gotten the right for npm to distribute the source code in context of npm.

> The they have gotten the right for npm to distribute the source code in context of npm.

There is absolutely no copyright or publishing right transfer that takes place when one "publishes" a package on NPM (or on Github). None.

The original author is absolutely entitled to a DMCA takedown notice and NPM would have to oblige him.

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#127

What exactly does colors do?

> What exactly does colors do? A picture is worth a thousand words → https://i.imgur.com/inxA7Pg.png The library inserts ANSI escape sequences [1] between the text you want to colorize in order to, well, colorize it ¯\_(ツ)_/¯ Many people are obsessed with colors in the Terminal, and so, they reach out to libraries like this. They exist in every major programming language ecosystem, even though colorizing text is as s…

Why wouldn't everyone roll their own solution? Doesn't seem to be a huge thing to me, but I could be wrong...

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#128

Earlier quoted context omitted.

> This is true for npm. After the incident with leftpad, you can't unpublish anymore. You can, however, publish a new patch update that completely breaks everything. You absolutely can unpublish, it just requires more steps. If NPM gets a DMCA takedown request they will absolutely have to fulfill it.

Not only does it require more steps, it also has to meet the following criteria[1]: * no other packages in the npm Public Registry depend on * had less than 300 downloads over the last week * has a single owner/maintainer So while your point is taken that unpublishing is possible under some circumstances, it is not for popular packages that are in use today. [1] https://docs.npmjs.com/policies/unpublish

None of these points have any legal standing, from a copyright perspective.

https://news.ycombinator.com/item?id=29868199

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#129

Imagine they introduced something worse. Could any developer explain to a manager why you needed to import this package? "Why do we need colors there?", "Why can't we make that colored ourself?"

An easy answer would be "we import thousands of packages either directly or recursively, so while we may be able to replicate the work of any one of those (which is unlikely to be true in the first place), it would take thousands+ of engineer hours to replicate all of them, and there was no way of knowing that this one among thousands would be sabotaged."

Re: Dev corrupts NPM libs 'colors' and 'faker', breaking thousands of apps

#130
post #92

Earlier quoted context omitted.

This is true for npm. After the incident with leftpad, you can't unpublish anymore. You can, however, publish a new patch update that completely breaks everything.

Why does a new version break projects without action by the project owners? In Go you would have to explicitly update to the broken version.

Because npm install has the insane default behavior of adding a fuzzy qualifier to your package.json, for example ^6.0.2 means all of the following versions are accepted: 6.0.2, 6.0.9, 6.7.84
Post reply on HN