Dependency Confusion: How I Hacked Into Apple, Microsoft and Other Companies
I see a lot of people saying things like "this is why package signing is important" and "we need to know who the developers are" and "we need to audit everything." Some of that is true to some degree, but let me ask you this: why do we consider it acceptable that code you install through a package manager implicitly gets to do <i>anything</i> to your system that you can do? That seems silly! Surely we can do better than that?<p>This article from Agoric is extremely relevant here, from a previous such incident (re: the event-stream package on npm): <a href="https://medium.com/agoric/pola-would-have-prevented-the-event-stream-incident-45653ecbda99" rel="nofollow">https://medium.com/agoric/pola-would-have-prevented-the-even...</a><p>Put simply: in many cases, the dependencies you install don't need nearly as much authority as we give them right now. Maybe some of these packages need network access (I see a few named "logger" which might be shipping logs remotely) but do they need unrestricted filesystem access? Probably not! (They don't necessarily even need unrestricted network access either; what they're communicating with is likely pretty well-known.)