Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
59b0b39
[readme] Add quick intro to `nvm`
alnorris Dec 6, 2016
1afd4f3
[Tests] Add `markdown-link-check` script
PeterDaveHello Nov 4, 2017
7b530ed
[Docs] Use absolute URL for #606 in README.md
PeterDaveHello Nov 4, 2017
7bbc573
[Tests] Print shell version in Travis CI
PeterDaveHello Apr 1, 2017
055af09
[readme] link "Windows WSL" down to the "important notes" section
SimonEast May 4, 2021
47f0b32
[readme] Add info to restart bash if verification not working in veri…
alex-mattukat Feb 25, 2018
59532c7
[actions] restrict permissions for `GITHUB_TOKEN`
step-security-bot Sep 10, 2021
d91087c
[Fix] `bash_completion`: be robust when `cd` is overridden
giladbarneaallot Sep 13, 2021
b6b6e68
[Fix] `set -a`: when this option is set, some `sh` shells break
ljharb Sep 15, 2021
cc6915e
[readme] updated automatic call script for bash
donnikitos Sep 21, 2021
91bd22a
[readme] fixed small typo afew to a few
strouja Jun 4, 2021
ca897ac
[readme] Avoid infinite loop in cdnvm()
tim-connolly Sep 22, 2021
4471b6b
[readme] remove duplicate word 'run'
GeorgiChochov Sep 26, 2021
11d71ab
[Fix] Regression in 2dad045
svenssonaxel Sep 23, 2021
07c02d4
[Tests] `nvm install-latest-npm`: node < 0.10 breaks with npm with dr…
ljharb Sep 29, 2021
53f9ba8
[Refactor] Use awk for path stripping
umireon Dec 22, 2016
93e0070
[Fix] `nvm_die_on_prefix`: filter prefixed env vars on name only, ign…
Nov 28, 2020
da5baa0
[Tests] use a matrix on the `nvm install-latest-npm` tests
ljharb Oct 5, 2021
10189bf
[readme] Add bash_completion in "manual install" section
felipear89 Oct 5, 2021
2bda9fd
[Tests] blacklist expired LetsEncrypt CA
Oct 6, 2021
ebbd30e
[Fix] `nvm install-latest-npm`: ensure npm 8 does not install on unsu…
ljharb Oct 5, 2021
e8f485b
[Dev Deps] update `doctoc`, `markdown-link-check`
ljharb Oct 7, 2021
5b3d188
v0.39.0
ljharb Oct 7, 2021
a284af9
[New] Add OpenBSD support
Apr 15, 2016
c9e7bb2
[Fix] install script: Add `--no-pager` option to git branch
nix6839 Oct 23, 2021
2f40eee
[shellcheck] apply v0.8.0 updates
ljharb Nov 19, 2021
ccd98f7
[Dev Deps] update `doctoc`
ljharb Nov 19, 2021
e9b2693
[readme] Describe another failure case for installing node versions f…
igrayson Nov 15, 2021
30486b9
[readme] Balance the if statement in bash example
Mahoney Nov 22, 2021
8937917
[Fix] `install`: properly check for curl/wget
ljharb Nov 25, 2021
275001b
[Tests] fix windows WSL tests
ljharb Nov 26, 2021
4856407
[Fix] `install`: fix method=script install condition
Meroje Nov 30, 2021
328dd50
[Fix] `nvm_get_download_slug`: better architecture selection for M1 Macs
ankit-toddleapp Nov 21, 2021
81fc056
[Tests] `nvm_get_download_slug`: add unit tests
ljharb Dec 3, 2021
6cc90a4
[actions] add step security runner
varunsh-coder Nov 22, 2021
fb4538b
[Fix] add missing `local` (handle nonexisting /sbin/init a bit more c…
Nov 17, 2021
0b4cd8d
[Refactor] create `nvm_normalize_lts` helper
ljharb Dec 17, 2021
aed1d73
[Fix] `ls-remote`/`install`: properly handle `lts/x` patterns
ljharb Dec 17, 2021
c4c7690
[Fix] `ls-remote`/`install`: support `lts/-X` patterns in installs
ljharb Dec 17, 2021
2459d17
[Tests] update test mocks
ljharb Dec 17, 2021
430860a
[Fix] `nvm alias`/`nvm_list_aliases`: support `lts/` aliases
ljharb Dec 16, 2021
0f62be6
[Dev Deps] update `markdown-link-check`
ljharb Dec 17, 2021
aa57406
[Fix] ensure `unload` removes `nvm_normalize_lts`
ljharb Dec 17, 2021
5cc74a6
[Tests] fix failing test
ljharb Dec 17, 2021
9600617
v0.39.1
ljharb Dec 17, 2021
ccd442d
[Refactor] add `nvm_extract_tarball` to consolidate extraction logic
opsbob Dec 19, 2021
79ad72d
[Fix] Update `nvm_extract_tarball` to support OpenBSD
opsbob Dec 19, 2021
d004c6b
[readme] clarify instructions for running Node on M1 Mac
lukelafountaine Dec 3, 2021
6cfaede
[Fix] `install`: better error message when xcode command line tools a…
ljharb Nov 28, 2021
81f0f3e
[Fix] `set -E`: Add test for `node install` on Bash with an ERR trap …
lkrms Dec 27, 2021
1875fe8
[Fix] avoid OpenBSD `nvm install` error when /sbin/init doesn't exist
lkrms Dec 26, 2021
c2f740a
[patch] HTTP -> HTTPS
ljharb Jan 18, 2022
2c0c34f
[Docs] HTTP => HTTPS
Schweinepriester Jan 16, 2022
39d9a42
[Fix] `install.sh`: error out if the install instructions are not fol…
ljharb Feb 8, 2022
d157cac
[readme] Correct typos in "Macs with M1 chip" section
antony-hk Mar 9, 2022
c367d7d
[Docs] fix fish load_nvm variable interpolations
legendecas Mar 28, 2022
7d86701
[readme] `fish`: send output from `load_nvm` to `/dev/stderr`
PonderCodes Apr 1, 2022
9e884b8
[Fix] `nvm install`: show proper version in `.nvmrc` install instruct…
deepakchethan Mar 22, 2022
bd083ff
[readme] minor cleanup
ljharb Apr 11, 2022
01886b4
[meta] Update CODE_OF_CONDUCT to current version
cupofcake92 Apr 15, 2022
ef3b20c
[readme] add logo
ljharb Apr 22, 2022
95269ff
[readme] Fix Git Install instruction list structure
SnipUndercover May 25, 2022
a82edf4
[Robustness] avoid a clobbered `ls`
ljharb Jun 2, 2022
5a4e918
[readme] cdnvm(): handle failed dir change
superjer Jun 28, 2022
8fd9480
[readme] Fix Ansible Linting Errors
etienne-miralytik Aug 24, 2022
4893128
[readme] optimize calling of `nvm version` in zsh
robertshuford Aug 26, 2022
b133f66
[Dockerfile] Update base image from Ubuntu 18.04 to 20.04, cc #2877
PeterDaveHello Sep 7, 2022
0ae8409
[Fix] `nvm install-latest-npm`: ensure npm 9 does not install on unsu…
ljharb Sep 8, 2022
7c929f8
[Fix] `install.sh`: support `~/.zprofile`
maxmaxme Sep 21, 2022
5e9791c
[perf] `nvm_print_versions`: re-implement using awk
ryenus Jun 5, 2022
28b3b0e
[readme] Update Alpine Linux Section
luni-moon Sep 27, 2022
c6269e0
[Fix] Don't override Mac M1 architecture for node ^14.17
joshkel Mar 30, 2022
d451e26
[Tests] node 18 no longer builds in travis-ci
robertshuford Oct 5, 2022
35758b7
[Tests] github actions removed homebrew and broke shellcheck
robertshuford Oct 6, 2022
2cfced7
[Docs] Add note about creating .bashrc file *as well as* .bash_profile.
dneu Jan 27, 2022
71a73b1
[Fix] `--help`: proper default `NVM_COLORS` info
ljharb Oct 13, 2022
0698ede
[Tests] update test mocks
ljharb Oct 13, 2022
f062cca
[Refactor] nvm install/`nvm_install_default_packages`: move "get" log…
ljharb Oct 13, 2022
0ccd099
v0.39.2
ljharb Oct 13, 2022
df01d81
[Refactor] add `nvm_wrap_with_color_code`; allow no color code
ljharb Oct 14, 2022
fe6268c
[Fix] `nvm install` error `unknown condition: -ne`
epoweripione Oct 15, 2022
df84c77
[actions] update some actions deps
ljharb Oct 17, 2022
89d6cdd
[Fix] improve backward compatibility for non-gnu awk
ryenus Oct 18, 2022
9721791
[Fix] grep: warning: stray \ before /
ryenus Oct 20, 2022
095a4ca
[Fix] `debug`: `awk`: not an option: `--version`
ryenus Oct 21, 2022
924d77c
[Fix] `debug`: correct mistaken `-V` to `--version` from #2922
ljharb Oct 24, 2022
1f4bb91
[Fix] ensure this variable is bound
ljharb Oct 26, 2022
e6fa80c
[Dev Deps] update `doctoc`, `markdown-link-check`, `replace`, `semver`
ljharb Oct 26, 2022
4c4b0d6
[Tests] fix nvm_list_aliases test to use mocks for LTS aliases
ljharb Oct 26, 2022
9bcbbef
[readme] Update shell profile file install notes
asadakbar Jun 19, 2020
333c52e
[meta] Improve contributors documentation
cupofcake92 Apr 15, 2022
447940a
[Tests] move tests that fail on focal to a separate suite that runs o…
ljharb Dec 22, 2022
abe5e30
[shellcheck] remove duplicate function
ljharb Dec 22, 2022
ac357c5
[Fix] `nvm install-latest-npm`: npm v6.14.18 can not be installed fro…
ljharb Dec 21, 2022
b86c91e
[actions] fix `latest-npm` tests so they use this repo’s nvm instead …
ljharb Dec 22, 2022
0ec2ca9
[Tests] update travis to use focal
ljharb Oct 26, 2022
59f448d
[Docs] added WSL troubleshooting with solution to (6) Could not resol…
mattjaf Dec 1, 2022
bf43874
[Tests] move installation_node tests back to xenial
ljharb Dec 23, 2022
d0bc227
[Tests] update test mocks
ljharb Dec 23, 2022
788c0a4
[meta] use HEAD instead of master where possible
ljharb Dec 23, 2022
552db40
v0.39.3
ljharb Dec 23, 2022
a60ac08
[actions] allow nvm to be installed
ljharb Dec 26, 2022
fe06825
[tests] Update urchin repository link
tlevine Dec 25, 2022
ce35311
[Tests] force the NVM_DIR to the expected location, for tests
ljharb Dec 27, 2022
dc69112
[Tests] improve debug output on failure
ljharb Dec 28, 2022
f36516b
[Tests] move install script tests to github actions
ljharb Oct 26, 2022
55075db
[Tests] add some `nvm_do_install` tests
ljharb Dec 28, 2022
edacf82
[Fix] Remove unneeded call to `ls` in `nvm_arch`
signed-log Jan 22, 2023
ecdc865
[readme] add note about reloading zshrc after editing
lanzoninicola Mar 9, 2023
8c30ac6
[readme] note zsh-nvm's AUTO_USE option
gimbo Dec 1, 2021
ee6f766
[Tests] downgrade python to v2 on travis
qasim-at-tci Mar 21, 2023
ea3b65f
[Tests] `npm bin` has been removed
ljharb Mar 21, 2023
ffcb521
[Perf] Improve performance of listing aliases
bbrk24 Mar 10, 2023
dde04f9
[Fix] recognize 32Bit docker container and use x86 arch
Mar 8, 2023
946da2e
[Dev Deps] update `markdown-link-check`
ljharb Mar 22, 2023
766341f
[readme] Update Travis CI badge and link url
PeterDaveHello Apr 3, 2023
b1331c2
[Tests] add unit tests for `nvm_download_artifact`
ljharb Apr 6, 2023
44e1d9c
[Dockerfile] Update base image from Ubuntu 20.04 to 22.04, cc #2877
PeterDaveHello Apr 5, 2023
0d9b5c2
[Fix] fix directory traversal when workdir path is not readable
zlotnleo Apr 8, 2023
d1a22a6
[readme] `cdnvm` function: fix shellcheck errors
dijonkitchen Apr 9, 2023
a07cd41
[Fix] `nvm_ls_current`: when `node` is present but crashes immediatel…
ljharb Apr 28, 2023
c08b38a
[Fix] `nvm_print_npm_version`: if `npm` exists but its node crashes, …
ljharb Apr 28, 2023
70aa611
[Fix] `nvm exec`: no longer error with '-q: invalid option' for zsh u…
spikegrobstein Apr 22, 2023
5410ae5
[Fix] fix node download link for armv8l
dewren99 Apr 29, 2023
0ebda7e
[meta] Remove unavailable testing script
dewren99 May 1, 2023
7c3cd81
[readme] Add instructions on how to install without editing shell config
milesfrain Apr 25, 2023
c26422a
[readme] Update logo header
AugustinMauroy Jun 5, 2023
9a76963
[readme] fix typo in resolv.conf filename
emmanuel-ferdman Jun 18, 2023
f86847f
[readme] add `nvshim` tool alongside `avn`
iamogbz Apr 15, 2020
15eba7b
[Fix] `nvm_strip_path`: Preserve leading/trailing colons
oliverhenshaw Jun 21, 2023
4fc91d4
[Dev Deps] update `markdown-link-check`, `semver`
ljharb Jul 25, 2023
8fbf8ab
v0.39.4
ljharb Jul 25, 2023
3afdce0
[Fix] `nvm install-latest-npm`: ensure npm 10 does not install on uns…
ljharb Jul 26, 2023
4618ce0
[Tests] a cleaner name for the windows tests
ljharb Dec 28, 2022
324b81a
[Fix] allow checksums to pass with a leading backslash
ljharb Aug 6, 2023
a1601ed
[readme] add examples of setting specific versions as default
Rockheung Jul 20, 2023
c92adb3
v0.39.5
ljharb Aug 22, 2023
1eaaada
[Perf] `nvm_check_file_permissions`: do not traverse into symlinks
ljharb Aug 26, 2023
1de3333
[Dockerfile] [Fix] add missing leading slash in path
namcxn Sep 18, 2023
d4a733e
[Dockerfile] Remove apt src disabling, no longer needed
PeterDaveHello Sep 19, 2023
1b102ab
[Tests] fix filename typo
JadeFlute0127 Oct 9, 2023
414e8d4
[Tests] switch cygwin mirror
ljharb Oct 9, 2023
8a83b36
[readme] missing parenthesis
Cadienvan Oct 6, 2023
2426a0c
[security] add prose explaining OpenSSF CII Best Practices badge results
ljharb Oct 20, 2023
fd41264
[readme] add section on bare `nvm install`
justindhillon Oct 23, 2023
8241287
[New] aliases: skip leading blank lines in alias file
ljharb Oct 23, 2023
bfce588
[Test] update test mocks
ljharb Oct 23, 2023
6aeab33
[Robustness] `nvm_list_aliases`: avoid overwritten sort
ljharb Oct 23, 2023
7aee54b
[readme] reorganize “deeper shell integration” instructions
benwiley4000 Jun 29, 2017
10cdda0
[Tests] update test mocks (new LTS, iron)
ljharb Oct 25, 2023
6743aef
[New] `nvm_resolve_alias`: only resolve one line of a multiline alias…
ljharb Oct 23, 2023
1f970cc
[Fix] `nvm_normalize_lts`: switch from expr to case
ljharb Nov 1, 2023
b64e547
[Tests] ensure windows tests install a node that actually works
ljharb Nov 1, 2023
ef7fc2f
[Fix] `nvm_get_arch`: proper value for alpine linux
asolopovas Sep 30, 2023
d02ddca
[Fix] `nvm_get_mirror`: disallow some non-URL characters
ljharb Nov 2, 2023
4bdd57b
[Fix] `install.sh`: when `NVM_INSTALL_GITHUB_REPO` is set, issue a wa…
ljharb Nov 3, 2023
b356fab
[meta] fix gitattributes to properly recognize images as binary
ljharb Nov 23, 2023
99646ee
[security] add threat model
ljharb Nov 15, 2023
cc765cc
[Fix] avoid overridden `hash`
ljharb Nov 25, 2023
6262b5a
[readme] rearrange install args
chrismeyers Oct 24, 2023
b1fa143
[Fix] `nvm_get_mirror`: ensure only a valid URL is allowed
ljharb Dec 2, 2023
925cff2
[readme] update M1 to “Apple Silicon” because of M2 and M3; fix typos
EchoEllet Dec 1, 2023
3e51872
[Tests] temporarily allow WSL tests to fail
ljharb Dec 4, 2023
6b15796
[Tests] temporarily allow cygwin tests to fail
ljharb Dec 4, 2023
064f259
[readme] fix level of headings
haocheng6 Nov 12, 2023
c73009f
v0.39.6
ljharb Dec 5, 2023
d86f270
[Fix] use `\hash` instead of `command hash` for `zsh`
ljharb Dec 6, 2023
bab86d5
v0.39.7
ljharb Dec 6, 2023
6c9cd2f
[security] fix typo in threat model
ljharb Dec 15, 2023
4e2a71b
[Docs] add `nvm unload` to uninstall nvm instructions
jbidad Jan 18, 2024
c82e7a6
Fix typo in WSL section of README
JParisFerrer Feb 18, 2024
c24c313
[actions] update action versions to use node 20
boidolr Feb 18, 2024
294ff9e
[readme] Fix uninstall instructions
huyz Feb 13, 2024
811c039
[actions] finisher tweaks
ljharb Mar 9, 2024
97093dc
[Dev Deps] update `markdown-link-check`, `semver`
ljharb May 30, 2024
1750b8d
[actions] update vampire/setup-wsl action
ljharb May 30, 2024
95081f0
[readme] update CII badge URLs
ljharb Jun 6, 2024
29dce5e
[New] allow `.nvmrc` files to support comments
ljharb Jun 7, 2024
c20db2a
[actions] improve default action permissions
ljharb Jun 10, 2024
aa427ad
[Tests] ensure travis can access public repo submodules
ljharb Jun 10, 2024
e597bb2
[Tests] use a better JSON parsing implementation
ljharb Jun 10, 2024
762f9ef
[Tests] only install python 2.7 if not already installed
ljharb Jul 6, 2024
dd89af5
[patch] Fix issue where zsh global aliases would break nvm help
AllySummers Jul 25, 2024
f439acd
[New] `nvm use`/`nvm install`: add `--save` option
maartin0 Aug 29, 2022
9327711
[Fix] `install-latest-npm`: npm ^8.7 breaks `npm ls` with file: deps
ljharb Jul 26, 2024
80cb39d
[debug] adding logging to makefile
narfdre Jul 22, 2024
4c7d899
[Tests] ignore travis-ci env vars; improve debug output
ljharb Jul 26, 2024
bd090ef
[New] Add support for `NVM_AUTH_HEADER` env var
dwelch2344 Jun 21, 2024
87a7097
[Fix] `nvm_get_default_packages`: use `awk` for more reliable file pr…
ljharb Jul 28, 2024
ff1257e
[Refactor] `nvm_has_colors`: also check the env var
ljharb Jul 29, 2024
24deac7
[readme] add OpenJS Ecosystem Sustainability Program partner
ljharb Jul 30, 2024
b5118ac
[Dev Deps] update `semver`
ljharb Jul 30, 2024
deac4e0
v0.40.0
ljharb Jul 30, 2024
423ee82
[Tests] fix `nvm ls-remote` unit test
ljharb Aug 1, 2024
271720e
[Fix] `nvm install -b`: when no binary is available, fail and output …
ljharb Aug 1, 2024
14acd3d
[Fix] `nvm install -b`: do not attempt to download source on a failed…
ljharb Aug 1, 2024
4beab63
[Fix] declare an unbound variable
ljharb Aug 7, 2024
81f18bc
[patch] `install.sh`: fix node capitalization
ljharb Aug 9, 2024
d5e2c92
[Fix] `nvm_has_colors`: avoid an aliased `tput`
ljharb Aug 20, 2024
a8c4185
[Refactor] `--save`: clean up some usage
ljharb Aug 20, 2024
c31a867
[Fix] `--save`: avoid a conflict with `set -e`
ljharb Aug 10, 2024
df70535
[Fix] `nvm_auto`: Fix bug introduced in c31a867
ljharb Aug 21, 2024
0d53381
[Tests] move sourcing suite to GHA
ljharb Aug 22, 2024
863bd63
[Tests] set proper permissions on test files
ljharb Aug 24, 2024
0ce8f5a
[Fix] `nvm_download`: ensure all args are quoted
ljharb Aug 21, 2024
ff76345
[Tests] fix broken tests exposed by 863bd63
ljharb Aug 27, 2024
179d450
v0.40.1
ljharb Aug 27, 2024
9a28dbd
[actions] use `node/install` instead of `node/run`
ljharb Aug 28, 2024
9fb9dec
[Fix] `nvm_normalize_lts`: error when an LTS name is not lowercase
ljharb Sep 4, 2024
da2720a
[Fix] `nvm ls`, `nvm alias`, `nvm install`: error when an LTS name is…
ljharb Sep 4, 2024
5dc31ac
[patch] give a more helpful message when `lts` alias is mistakenly used
r4reetik Oct 5, 2024
6b70c40
[Fix] `nvm_install_latest_npm`: avoid unbound variable
ljharb Oct 23, 2024
51ea809
[Tests] ensure that unit tests use only mocked LTS names
ljharb Oct 31, 2024
9c9ff4b
[meta] Rename .github/ISSUE_TEMPLATE.md to .github/ISSUE_TEMPLATE/ISS…
cheeragpatel Oct 30, 2024
1be4257
[Tests] update mocks
ljharb Oct 31, 2024
ba98270
[meta] update issue template
ljharb Nov 4, 2024
ccf6d16
[meta] disable blank issues
ljharb Nov 4, 2024
d648a3b
[meta] add DCO
ljharb Nov 5, 2024
cd22c84
[New] `install.sh`: add `$ZDOTDIR` to zsh search
menaechmi Nov 6, 2024
3de0b15
[Tests] run urchin tests on pull requests
menaechmi Nov 12, 2024
abd02e5
[Fix] `install.sh`: fix failing install tests (#3458)
menaechmi Nov 12, 2024
9659af6
[Tests] `nvm_detect_profile`: refactor
ljharb Nov 12, 2024
0641363
[Tests] `install.sh`: clean up `nvm_detect_profile` tests
ljharb Nov 8, 2024
287d535
[readme] remove `avn` from readme
andrew-chang-dewitt Nov 13, 2024
b77fcec
[readme] add docker tips
blole Nov 13, 2022
14507f8
[Tests] migrate `installation_iojs` test suite to GitHub Actions
jwagantall Nov 21, 2024
dae1427
[actions] TOC: use latest LTS node
ljharb Nov 23, 2024
247ed8a
[readme] fix `--no-use` example
jeremygau Nov 28, 2024
b9b0ea8
[Fix] `install-latest-npm`: npm v11 is out
ljharb Dec 16, 2024
19f452b
[Fix] avoid bash-specific syntax
ljharb Dec 20, 2024
d90a791
[readme] update copyright notice
ctcpip Jan 10, 2025
6135555
[Tests] Migrate slow test suite from Travis CI
jwagantall Nov 15, 2024
1d39e35
[Tests] temporarily skip this failing travis test to unblock progress
ljharb Feb 3, 2025
572c757
[readme] fnm -> nvm.fish
kidonng Jul 18, 2021
e5521cf
[actions] release test needs git tags
ljharb Feb 4, 2025
9f520c9
[Tests] `nvm exec`/`nvm run`: add `--silent` tests
jumbosushi Oct 12, 2016
74eb396
[Dev Deps] update `markdown-link-check`
ljharb Feb 4, 2025
06a9179
[Refactor] combine `sed -e` invocations/arguments
ljharb Feb 4, 2025
759f70f
[Refactor] prefer `case` over if/else chains
ljharb Feb 5, 2025
f0f8ed1
[Dev Deps] update `semver`
ljharb Feb 26, 2025
5c12680
[Dev Deps] update `markdown-link-check`
ljharb Mar 11, 2025
8dbc22f
[readme] update link
ljharb Mar 11, 2025
df9ac58
[Fix] `reinstall-packages`: do not reinstall corepack
ljharb Mar 11, 2025
ffec9fe
v0.40.2
ljharb Mar 11, 2025
99352a6
[Fix] `nvm_install_latest_npm`: fix node version detection
todeveni Apr 9, 2025
977563e
v0.40.3
ljharb Apr 23, 2025
1aab8b2
[meta] update security policy; add IRP
ljharb Jun 23, 2025
9602f4f
[meta] Add comprehensive .github/copilot-instructions.md for better A…
Copilot Jul 2, 2025
0215ef8
[actions] Fix Cygwin workflow HOME variable and add debug output
Copilot Jul 3, 2025
c3d674f
[readme] update installation by docker to v0.40.3
zwpaper Jun 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test/bak
.urchin.log
.urchin_stdout
test/**/test_output
test/**/.nvmrc

node_modules/
npm-debug.log
Expand Down
11 changes: 9 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ trim_trailing_whitespace = true
[*.txt]
indent_size = false

[test/fast/Listing versions/Running "nvm ls" calls into nvm_alias]
[test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias]
indent_size = false

[test/fast/Listing versions/Running "nvm ls --no-alias" does not call into nvm_alias]
[test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias]
indent_size = false

[test/fast/Unit tests/mocks/**]
Expand All @@ -26,3 +26,10 @@ insert_final_newline = off

[Makefile]
indent_style = tab

[test/fixtures/nvmrc/**]
indent_style = off
insert_final_newline = off

[test/fixtures/actual/alias/empty]
insert_final_newline = off
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* eol=lf
* text=auto eol=lf
117 changes: 117 additions & 0 deletions .github/INCIDENT_RESPONSE_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Incident Response Process for **nvm**

## Reporting a Vulnerability

We take the security of **nvm** very seriously. If you believe you’ve found a security vulnerability, please inform us responsibly through coordinated disclosure.

### How to Report

> **Do not** report security vulnerabilities through public GitHub issues, discussions, or social media.
Instead, please use one of these secure channels:

1. **GitHub Security Advisories**
Use the **Report a vulnerability** button in the Security tab of the [nvm-sh/nvm repository](https://github.com/nvm-sh/nvm).

2. **Email**
Follow the posted [Security Policy](https://github.com/nvm-sh/nvm/security/policy).

### What to Include

**Required Information:**
- Brief description of the vulnerability type
- Affected version(s) and components
- Steps to reproduce the issue
- Impact assessment (what an attacker could achieve)

**Helpful Additional Details:**
- Full paths of affected scripts or files
- Specific commit or branch where the issue exists
- Required configuration to reproduce
- Proof-of-concept code (if available)
- Suggested mitigation or fix

## Our Response Process

**Timeline Commitments:**
- **Initial acknowledgment**: Within 24 hours
- **Detailed response**: Within 3 business days
- **Status updates**: Every 7 days until resolved
- **Resolution target**: 90 days for most issues

**What We’ll Do:**
1. Acknowledge your report and assign a tracking ID
2. Assess the vulnerability and determine severity
3. Develop and test a fix
4. Coordinate disclosure timeline with you
5. Release a security update and publish an advisory and CVE
6. Credit you in our security advisory (if desired)

## Disclosure Policy

- **Coordinated disclosure**: We’ll work with you on timing
- **Typical timeline**: 90 days from report to public disclosure
- **Early disclosure**: If actively exploited
- **Delayed disclosure**: For complex issues

## Scope

**In Scope:**
- **nvm** project (all supported versions)
- Installation and update scripts (`install.sh`, `nvm.sh`)
- Official documentation and CI/CD integrations
- Dependencies with direct security implications

**Out of Scope:**
- Third-party forks or mirrors
- Platform-specific installs outside core scripts
- Social engineering or physical attacks
- Theoretical vulnerabilities without practical exploitation

## Security Measures

**Our Commitments:**
- Regular vulnerability scanning via GitHub Actions
- Automated security checks in CI/CD pipelines
- Secure scripting practices and mandatory code review
- Prompt patch releases for critical issues

**User Responsibilities:**
- Keep **nvm** updated
- Verify script downloads via PGP signatures
- Follow secure configuration guidelines for shell environments

## Legal Safe Harbor

**We will NOT:**
- Initiate legal action
- Contact law enforcement
- Suspend or terminate your access

**You must:**
- Only test against your own installations
- Not access, modify, or delete user data
- Not degrade service availability
- Not publicly disclose before coordinated disclosure
- Act in good faith

## Recognition

- **Advisory Credits**: Credit in GitHub Security Advisories (unless anonymous)

## Security Updates

**Stay Informed:**
- Subscribe to GitHub releases for **nvm**
- Enable GitHub Security Advisory notifications

**Update Process:**
- Patch releases (e.g., v0.40.3 → v0.40.4)
- Out-of-band releases for critical issues
- Advisories via GitHub Security Advisories

## Contact Information

- **Security reports**: Security tab of [nvm-sh/nvm](https://github.com/nvm-sh/nvm/security)
- **General inquiries**: GitHub Discussions or Issues

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
name: File an issue…
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

Expand Down
28 changes: 28 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Security

Please file a private vulnerability report via GitHub, email [@ljharb](https://github.com/ljharb), or see https://tidelift.com/security if you have a potential security vulnerability to report.

## OpenSSF CII Best Practices

[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684)

There are three “tiers”: passing, silver, and gold.

### Passing
We meet 100% of the “passing” criteria.

### Silver
We meet 100% of the “silver” criteria.

### Gold
We meet 78% of the “gold” criteria. The gaps are as follows:
- because we only have one maintainer, the project has no way to continue if that maintainer stops being active.
- We do not include a copyright or license statement in each source file. Efforts are underway to change this archaic practice into a suggestion instead of a hard requirement.

## Threat Model

See [THREAT_MODEL.md](.github/THREAT_MODEL.md).

## Incident Response Plan

Please see our [Incident Response Plan](.github/INCIDENT_RESPONSE_PLAN.md).
109 changes: 109 additions & 0 deletions .github/THREAT_MODEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# `nvm` Threat Model

## Introduction

Threat model analysis assists organizations to proactively identify potential security threats and vulnerabilities, enabling them to develop effective strategies to mitigate these risks before they are exploited by attackers.
Furthermore, this often helps to improve the overall security and resilience of a system or application.

The aim of this section is to facilitate the identification of potential security threats and vulnerabilities that may be exploited by adversaries, along with possible outcomes and appropriate mitigations.

## Relevant assets and threat actors

The following assets are considered important for the `nvm` project:
- `nvm` source code and project documentation
- Underlying `nvm` dependencies
- `nvm` development infrastructure
- `nvm` installed devices including servers

The following threat actors are considered relevant to the `nvm` application:
- External malicious attackers
- Internal malicious attackers
- Services
- Malicious insider actors
- Third-party libraries

## Attack surface for external/internal attackers and services

In threat modeling, an attack surface refers to any possible point of entry that an attacker might use to exploit a system or application.
This includes all the paths and interfaces that an attacker may use to access, manipulate or extract sensitive data from a system.
By understanding the attack surface, organizations are typically able to identify potential attack vectors and implement appropriate countermeasures to mitigate risks.

In the following diagrams, _External Malicious Attacker_ applies to threat actors who do not yet have direct access to the `nvm` application and the underlying operating system, while the _Internal Malicious Attacker_ applies to an attacker with access to the device (computer, server), potentially after successfully exploiting a threat from the _External Malicious Attacker_ scenario.
**Please note that some of the external threats may be also exploitable from internal threats and vice versa.**

<img src="./external-threat-actor.png" alt="Fig.: Possible attacks from internal and external threat actors and services" />
Fig.: Possible attacks from internal and external threat actors and services

## Identified threats

The identified threats against the `nvm` application are as follows:

### Threat ID 1: `nvm` commands

Overview: The `nvm` commands and subcommands take user input for handling and executing appropriate functions from the project directory (or any parent directory).
When user-controlled inputs are not adequately validated and later passed to the `nvm` functions as a part of a command, an attacker might be able to execute operating system commands triggered by any parsing functionality.

Possible Outcome: Attacks against `nvm` commands could lead to unauthorized access to user data or unauthorized access to the device (i.e. laptop or server, depending on where `nvm` is installed), resulting in loss of user private data stored on the device, among other possibilities.

Recommendation: Input validation should be implemented to prevent attackers from requesting operating system commands.
Similarly, secure coding practices ought to be in place to minimize the risk of buffer overflow vulnerabilities.

### Threat ID 2: URI scheme

Overview: `nvm` commands heavily use the [Secure HyperText Transfer](https://datatracker.ietf.org/doc/html/rfc2660) protocol for `nvm` related actions.
Missing [scheme](https://datatracker.ietf.org/doc/html/rfc3986#section-3.1) validation for any `nvm` command might result in file retrieval, enumeration, file overwrite, or [path traversal](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/01-Testing_Directory_Traversal_File_Include) attacks.
An example of this could be path validation for [`nvm_download`](https://github.com/nvm-sh/nvm/blob/ef7fc2f2c06ad75fe7fbabf28d427561ae7b007d/nvm.sh#L118), among many other possibilities.

Possible Outcome: Security misconfiguration flaws for URI scheme may lead to unauthorized access to user data, as well as data integrity compromises.

Recommendation: Adequate input validation should be implemented to prevent attackers from enumerating, retrieving and writing to application files and paths.

### Threat ID 3: Communication channel

Overview: The `nvm` commands and its subcommands use network protocol to communicate with external services.
Insecure communication may allow malicious attackers to perform [_Man-in-the-Middle_](https://owasp.org/www-community/attacks/Manipulator-in-the-middle_attack) attacks in order to manipulate the data sent during the users’ active connection.

Possible Outcome: Usage of plaintext communication protocols, like HTTP could lead to data sniffing and modification through insecure communications channels.

Recommendation: Mitigation countermeasures such as data encryption should be in place to prevent data manipulation via insecure communication channels.

### Threat ID 4: Environment variables

Overview: Each `nvm` installation defines its environment variables, which should be secured from internal malicious attackers, preventing access control attack vectors.
Missing stringent restrictions on setting variables, might allow attackers to prepare various targeted attacks against other local users, who use `nvm` in their user space.
For example, [_Privilege Escalation_](https://owasp.org/Top10/A01_2021-Broken_Access_Control/), [_Command Injection_](https://cwe.mitre.org/data/definitions/77.html), as well as many other parser-related attacks.

Possible Outcome: Attacks against environment variables could lead to unauthorized access to the user space, resulting in the loss of user private data and disruptions in service availability.

Recommendation: Adequate hardening of configuration file permissions should be in place for all relevant configuration files, as this provides protection against attackers able to manipulate variables and inject malicious code.

## Attack surface for malicious insider actors and third-party libraries

The following diagram summarizes the main possible threats against the `nvm` project from malicious insider actors and third-party libraries:

<img src="./insider-threat-actor-and-libs.png" alt="Fig.: Possible attacks from insider threat actors and third-party libraries" />
Fig.: Possible attacks from insider threat actors and third-party libraries

The identified threats against the `nvm` project are as follows:

### Threat ID 1: Insider threat actor

**Overview**: An insider threat actor, such as an `nvm` project contributor or employee with access to the code base, might abuse their role in the organization to modify the `nvm` application source code.
For example, intentionally adding malicious code snippets, clearing logs after being written and/or modifying specific sections of the documentation.

**Possible Outcome**: Reputation damage, financial losses.

**Recommendation**: Secure coding practices, code reviews, automated code scanning and separation of duties (i.e. requiring at least two developers to approve any code change) are potentially useful security controls to identify and mitigate vulnerabilities that may be introduced by an insider threat actor.

### Threat ID 2: Third-party libraries

**Overview**: Please note that while `nvm` does not currently make use of any third-party libraries, this might become an attack vector if that changes in the future.
Third-party libraries may introduce potential risks related to maintaining security requirements by third-party vendors.
As a result, third-party libraries used by the `nvm` project, might contain vulnerabilities, such as [_Buffer Overflows_](https://owasp.org/www-community/vulnerabilities/Buffer_Overflow), [_Format String Vulnerabilities_](https://owasp.org/www-community/attacks/Format_string_attack), as well as many other types of weaknesses that, in a worst-case scenario may lead to _Remote Code Execution_ (_RCE_).
Additionally, the maintainer of a third-party dependency might introduce a vulnerability on purpose, or be compromised by an attacker that subsequently introduces vulnerable code.

**Possible Outcome**: Code vulnerabilities may lead to unauthorized access to user data, loss of user private data, service disruptions and reputation damage.

**Recommendation**: Third-party libraries should be kept up-to-date, applying patches to address publicly known vulnerabilities in a timely fashion.
Monitoring and logging capabilities should also be in place to detect and respond to potential attacks.
SLSA compliance may also be considered for further supply chain security hardening.
Loading
Loading