2 ms·
The blast radius is made far worse by npm having the concept of "postinstall" which allows any package the ability to run a command on the host system after it
by qudat 1y ago
The blast radius is made far worse by npm having the concept of "postinstall" which allows any package the ability to run a command on the host system after it was installed.
This works for deps of deps as well, so anything in your node_modules has access to this hook.
It's a terrible idea and something that ought to be removed or replaced by something much safer.
- zarzavat 1y agoI agree in principle, but child_process is a thing so I don't think it makes much difference. You are pwned either way if the package can ever execute code.