r/javascript • • Nov 27 '18

event-stream vulnerability explained

https://schneid.io/blog/event-stream-vulnerability-explained/
412 Upvotes

70 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Nov 28 '18

[deleted]

1

u/filleduchaos Nov 28 '18
  • Namespacing

  • Package signing

Would all have made this way more difficult to pull off.

3

u/bjpbakker Nov 28 '18

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.

1

u/filleduchaos Nov 28 '18

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.