2 ms·
What I really wish that NPM would do, as an initial security addon would be to load each of the JS files and check for all the IP addresses and URLs in the modu
by tracker1 7y ago
What I really wish that NPM would do, as an initial security addon would be to load each of the JS files and check for all the IP addresses and URLs in the module, and include that in the package information. If it's not an API client, then one can/could be very leery of any addresses and could flag any packages that add/change them between releases, or maybe require a major version bump.
- afuchs 7y agoA basic search could find strings that look like network addresses, but those addresses are easy to obfuscate. Any algorithm that can detect every possible obfuscated address would have to include a solution for the halting problem. So detecting every single address that might be encoded in a JS file is impossible, an undecidable problem.
- tracker1 7y agocould load the module in an isolated container and run it... does it try to make network connections or dns queries?