Even if we didn't have post install scripts wouldn't the malware just run as soon as you imported the module into your code during the build process, server startup, testing, etc?
I can't think of an instance where I ran npm install and didn't run some process shortly after that imported the packages.
Many people have non-JS backends and only use npm for frontend dependencies. If a postinstall script runs in a dev or build environment it could get access to a lot of things that wouldn't be available when the package is imported in a browser or other production environment.
rectang|5 months ago
201984|5 months ago
debazel|5 months ago
I can't think of an instance where I ran npm install and didn't run some process shortly after that imported the packages.
theodorejb|5 months ago
amai|5 months ago
myroon5|5 months ago