It's far from perfect but adds some additional security for what's accessible on the file system, restricts executables and access to environment variables.
Add wrapper executables (for node and npm) to a PATH
that is ahead of NVM_BIN
:
#!/usr/bin/env bash
set -eu
bin_path="$NVM_BIN"