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?
Many packages suddenly disappeared
291–300 of 520 posts
Re: Many packages suddenly disappeared
#292Earlier 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!
Re: Many packages suddenly disappeared
#293Yikes, 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.
Other languages and package management systems don't encourage this kind of insanity.
Re: Many packages suddenly disappeared
#294Hmm, 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.
Re: Many packages suddenly disappeared
#295Earlier 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.
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
#296Earlier 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.
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
#297Re: Many packages suddenly disappeared
#298PSA: 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
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
#299Earlier 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?
Re: Many packages suddenly disappeared
#300NPM 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