I'm unfamiliar with 'the Kite incident' but the NPM incidents have been due to
a) the ass-backwards approach the company took to building a package manager.
b) the new development paradigm of "fuck it, find a library". Flying Spaghetti monster forbid these hipster developers actually have to write some fucking code themselves, its easier just to duct-tape together 200 different 'libraries', half of which do what you could do in 5 lines or less, and produces a dependency tree like fucking crab grass.