What alternative do you suggest?
Do you mean not install outside a sandbox?
It will always introduce friction, though.
Modern software development is simply too fast to be reviewed properly.
So, amazing-sandbox at its core is nothing but a glorified docker command generator (in default mode).
If your distribution requires more than this, then it's not really a module, or combines too many non-modular components, and should be distributed differently.
The ability for npm to run scripts on any level should be removed.
Then we can go back to worrying about namespacing issues.
Even Python has that ability now. Also, `npm run dev` is running the script with full disk access.
Heck, Vscode/Cursor will auto-execute code if you open a project. And this has been actively used in the wild https://ashishb.net/security/contagious-interview/