This sort of attack happened before (on a smaller scale) earlier this year. Until the npm maintainers actually start caring just a bit about security, these attacks will keep coming.
Agreed. Except in this case the original author granted all the permissions to the bad actor, so I would assume that any signing keys would have been handed over too.
Yeah, but that's a much bigger thing to ask of someone than "meh, let me just push a button to let them maintain the repo". (GPG) signing keys are tied to your identity not just one package. You wouldn't just be giving them commit/push access to one repo - you'd be giving them carte blanche to straight up impersonate you anywhere you use your key which would probably have given the maintainer more pause.
Beyond that though, with namespacing it would largely be a moot point because handing over control would change the package name. Then anyone who wants to depend on the new version can explicitly change their package list to point at @newperson/module.
3
u/bjpbakker Nov 27 '18
This sort of attack happened before (on a smaller scale) earlier this year. Until the npm maintainers actually start caring just a bit about security, these attacks will keep coming.