wbyoung / avn

Automatic Version Switching for Node
MIT License
1.14k stars 54 forks source link

npx disabled by default, opt-in only #89

Closed troywweber7 closed 4 years ago

troywweber7 commented 4 years ago

When avn is activated, I've noticed that when I run a misspelled command, it tries to run the command from npx. Since npx can reach out to npm for binaries, I consider this a security risk. Avn should default to this being disabled, but allow users to opt-in to it. At the very least, if that is not possible, I'd like to know how to disable it for my own peace of mind.

Thanks!

Details

nvm specific

ljharb commented 4 years ago

It could run it with --no-install.

troywweber7 commented 4 years ago

It might be doing that already, actually. If I try to run cowsay it tries with npx but fails, whereas npx cowsay actually succeeds. I'm closing this issue because It seems to be save of that already.