Live data from Hacker News

Post-mortem of this weekend's NPM incident

blog.npmjs.org

21–30 of 44 posts

Re: Post-mortem of this weekend's NPM incident

#21
post #4

Earlier quoted context omitted.

Why allow namespace recycling at all? The potential harm is high and the potential benefit is some slight convenience. If npm packages used a Github-style "author/package" format, name collision would never be an issue again.

>If npm packages used a Github-style "author/package" format, name collision would never be an issue again. They have that, and many are finally starting to take advantage of it (with babel being the most prominent with their latest version) But this doesn't completely "fix" the problem, since the exact same conflicts can still happen with the "author" name (if someone takes "google\" there are going to be some very…

> (if someone takes "google\" there are going to be some very upset californians)

Not a problem at all. They will just get the name by force. It already happened before, google "npm kik".

Re: Post-mortem of this weekend's NPM incident

#22
post #21

Earlier quoted context omitted.

>If npm packages used a Github-style "author/package" format, name collision would never be an issue again. They have that, and many are finally starting to take advantage of it (with babel being the most prominent with their latest version) But this doesn't completely "fix" the problem, since the exact same conflicts can still happen with the "author" name (if someone takes "google\" there are going to be some very…

> (if someone takes "google\" there are going to be some very upset californians) Not a problem at all. They will just get the name by force. It already happened before, google "npm kik".

Yeah, but it's still a "problem" in that it technically doesn't change anything from the current system.

Re: Post-mortem of this weekend's NPM incident

#24
post #19

So, a spammer uploaded something containing copied data from a legitimate user and npm deleted everything from that user. Oy. Seems like npm might want to review the policy that allows stuff like that to happen. Even if a user violates the spam policy (which, to be clear, it seems the affected user in this case did NOT do), that hardly seems to be appropriate grounds for deleting everything the user has ever publishe…

It wasn't a policy it was a spam heuristic

I meant the policy which allowed this to happen:

`In the course of reviewing and acting on spam reports, an npm staffer acted on this flag without further investigating the user and removed the user and all of their packages from the registry.`

Specifically, a policy that allows removing "all of [a user's] packages" based on something related to the user rather than on the packages themselves.

Feels like there should be a disconnect between decisions made about a 'user' and those made about a 'package'.

Once the package is published, there should be an understanding that the package belongs to npm and npm's users, even if the original publisher retains some authority over it.

And if there is cause to ban a user, it should not automatically mean that packages published by the user are affected (aside from removing whatever authority the user had).

Re: Post-mortem of this weekend's NPM incident

#25
> Our first action, which began immediately after the incident concluded, was to implement a 24-hour cooldown on republication of any deleted package name

I don't understand this. Why hard delete packages at all? Soft deleting feels like it would be easier and would stop people republishing with the same name.

They could also bake their warning process for dependent libraries (i.e. "this package is gone!") into the soft delete process.

Re: Post-mortem of this weekend's NPM incident

#26
post #4

Earlier quoted context omitted.

Why allow namespace recycling at all? The potential harm is high and the potential benefit is some slight convenience. If npm packages used a Github-style "author/package" format, name collision would never be an issue again.

>If npm packages used a Github-style "author/package" format, name collision would never be an issue again. They have that, and many are finally starting to take advantage of it (with babel being the most prominent with their latest version) But this doesn't completely "fix" the problem, since the exact same conflicts can still happen with the "author" name (if someone takes "google\" there are going to be some very…

It does fix the problem, although consumers of the package need to first verify they trust the original author.

For example, if Google published "Google/polymer", dependents would be unaffected if a new package was published from "badguy/polymer". I think you're saying it's still not fixed because someone could register the Google author name before the real Google gets it, but that is a understood problem across every website.

Re: Post-mortem of this weekend's NPM incident

#27

Our first action, which began immediately after the incident concluded, was to implement a 24-hour cooldown on republication of any deleted package name. Why not infinity hours? I don't get it.

If it's a spam package that gets deleted, that would mean you'd quickly run out of available names.

Re: Post-mortem of this weekend's NPM incident

#28
post #4
post #3

This is a good post-mortem with clear, policy-based remediations. Nicely done. I wonder why they are only preventing republishing for 24 hours. Is there a good reason to allow a package namespace to be recycled with less than, say, a week? Is it based on the assumption that the only case where it comes up is during an incident, and 24 hours is enough time to assume an incident will be resolved? I'm curious what went…

Why allow namespace recycling at all? The potential harm is high and the potential benefit is some slight convenience. If npm packages used a Github-style "author/package" format, name collision would never be an issue again.

You already sound smarter than whoever leads the Node Package Mess.

Re: Post-mortem of this weekend's NPM incident

#29
post #7

> At the time of Saturday’s incident, however, we did not have a policy to publish placeholders for packages that were deleted if they were spam. I see this acknowledgement, but I cannot find where they will remedy this by putting placeholders in place of spam removals. As a concession, maybe only placeholders for spam removals of packages that are older than X days or depended on (explicitly or transitively) by X pa…

They have added a 24hour re-publishing cooldown for all package removals regardless of reason. Exceptions are made for the original publisher and npm staff. Explained somewhere near the bottom of the post, basic rational is that it gives them time to notice fuckups and fix them.

This does not alleviate the issue where you can reuse package names. I suppose they believe what they mark as spam packages won't be used enough or is already bad enough that reusing the name is harmless. And they probably also believe that they can catch fuckups in a day. I don't think either are necessarily true and are only true in this case because it hit popular dep trees. But what happens when something is erroneously marked as spam that's not as popular and the downstream dependents don't realize in 24 hours? If the problem is that "placeholders" are too heavy, then they could be made lighter weight or put some rules around when they will add them and when they won't.

Re: Post-mortem of this weekend's NPM incident

#30
post #4

Earlier quoted context omitted.

Why allow namespace recycling at all? The potential harm is high and the potential benefit is some slight convenience. If npm packages used a Github-style "author/package" format, name collision would never be an issue again.

I'd like to see a package registry with (1) Github-style author-namespaced packages, and (2) package signing (i.e. if an author starts signing packages with a different key, I'd like to know about it). Maybe integrate the latter with Keybase to help users decide if they should trust a key. I don't know how you gain any kind of critical mass trying to compete against a well-established registry like npmjs, though.

(1) has the consequence that names are associated with the original creator long after they may no longer be involved.

Package signing I can't tell if it's a good idea or not. It would require you to accept a new key in this case, but that is going to happen super frequently with NPM, inducing alert fatigue, and it doesn't do anything to prevent the authors' publishing credentials getting stolen.

Post reply on HN