Live data from Hacker News

Many packages suddenly disappeared

github.com

291–300 of 520 posts

Re: Many packages suddenly disappeared

#291
post #268

Hi folks, npm COO here. This was an operational issue that we worked to correct. All packages are now restored: https://status.npmjs.org/incidents/41zfb8qpvrdj

Any chance of a technical write-up so that we can all learn from whatever happened?

Absofuckinglutely. It's being done as we speak.

Re: Many packages suddenly disappeared

#292

Earlier quoted context omitted.

What was the root cause of the issue?

Yes I'd be very curious to see a debrief on what the technical cause was. Thanks to the npm team for a quick weekend fix, at any rate!

We're working on a full post-mortem now. Until then we don't want to give out misleading/partial information.

Re: Many packages suddenly disappeared

#293

Yikes, what is it about node/npm/javascript that makes it feel like a house of cards?

The npm repository is the largest package repository in the world. A lot of the major incidents they've could have happened to other ecosystems (e.g. PyPi allows a user to delete packages that other packages depend on), but they've either not happened or haven't had as large an impact. When npm breaks, everyone notices, because everyone either uses npm or knows someone who does.

Largely because Javacsript is so broken by default that it is almost required to depend on a whole slew of dependencies for functionality other languages contain in their built-in standard libraries. And furthermore, NPM dependencies are broken down into stupidly small units, versioned rapidly, and enforces very little consistency among transitive dependencies.

Other languages and package management systems don't encourage this kind of insanity.

Re: Many packages suddenly disappeared

#294
post #81
post #61

Hmm, I Java world we pretty much always used a local (company-owned) Maven proxy server, which grabbed packages from public repos and cached them locally to make sure builds still work if public servers were down or slow... or packages disappeared. This isn't a standard practice in JS world?

It is at big orgs, but not small shops.

We do it even at home. Not full dep-server but local backup.

Re: Many packages suddenly disappeared

#295
post #197
post #59

Earlier quoted context omitted.

I've stopped wondering about NPMs structure. But still: Our bog-standard in-house java development setup would be unaffected by this class of problems. You need some kind of private maven repository, and nexus or artifactory automatically mirrors downloaded dependencies. And on top of that, versions are pinned per default. So new malicious versions wouldn't be used either. We could safely build new hotfix releases ev…

npm does pin versions by default (although originally they did not). The fact that you _need_ to have a local mirror for Maven isn't really a plus for Java. You can get a local mirror or similar setup for npm also.

It is not a requirement for Java it is just standard practice.

Also Maven does not allow you to remove packages once they are pushed, I think that is what he meant by Java being unaffected.

Re: Many packages suddenly disappeared

#296

Earlier quoted context omitted.

Or it could be that it's easy to do simple low-hanging-fruit things and harder to do more complicated things. The whole JS ecosystem has come together in a rather ad-hoc way, it's plain stupidity or moronic political gamesmanship to assume more motivation than "nobody thought it worth blocking the entire platform to build a fully-trusted base infrastructure so far." It's funny how many people get easily pissed off ab…

> it appears their reaction to getting some power for the first time in their lives was to jump into the bully camp themselves Or maybe they see others using political correctness to bully people around them.

That seems like an implausible explanation for a comment trying to make a political issue out of two disjoint things: a package manager design flaw and an editorial control policy for package names. "Publishers" having a level of interest in what goes out on there platform is as old as anything, and so is flawed software design.

So I stick by my stance that it seems like tying to try those things together ("you screwed this up because you're morally in the wrong as shown by your focusing on the wrong things") to advance a personal political agenda is the more bullying behavior, here.

Re: Many packages suddenly disappeared

#298
post #101
post #5

PSA: Please be cautious because this is an excellent opportunity for taking over packages and injecting malware by malicious people. Example: https://www.npmjs.com/package/duplexer3 which has 4M monthly downloads just reappeared, published by a fresh npm user. They published another two versions since then, so it's possible they've initially republished unchanged package, but now are messing with the code. Previously…

maybe it's time to push for adding signed packages to npm long discussion here: https://github.com/node-forward/discussions/issues/29

Signing won't help unless the end user specifies the signature or certificate that they expect (signing would only help ensure package upgrades are from the same author).

If you're going to have clients specify a signature anyway, then you don't need to sign packages, you just need strong one way hash function, like SHA-1024 or something. User executes "pkg-mgr install [package name] ae36f862..."

Either way, every tutorial using npm will become invalid.

Re: Many packages suddenly disappeared

#299
post #207

Earlier quoted context omitted.

Node was a very interesting thing back when it started. It was a hack, but a nice kind of hack. You could write some efficient servers with it. But then the community that formed around it, with it the project went berserk.

A bit like PHP in that way?

Well, kind of. Node was not a general purpose tool as conceived initially. You would write some I/O bound servers in it. And PHP too is not a general purpose tool, it is for writing interactive web pages (in its pre-Web2.0 sense) easily. Though Node.js was way more intellectually designed. I don't know much about PHP, but there's lots of literature (see https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/).

Re: Many packages suddenly disappeared

#300
post #32

NPM is extremely vulnerable to typosquatting. Be cautious with what you install. The install scripts can execute arbitrary code. NPM's team response is that they hope that malicious actor won't exploit this behaviour. According to my tests, typosquatting 3 popular packages allows to take over around 200 computers in 2 weeks time it takes their moderators to notice it.

typical JavaScript engineering

Javascript is a very handy language, it's held back by all the gymnastics it needs to do to get over browser/www limitations, and an influx of low skill developers with no diploma.
Post reply on HN