Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/cfg/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ _(not listed in `cfg docs`)_
| Version aliases (`stable=24.x`, etc.) | Prefer [`nvm alias`](../command/nvm/alias); values are stored as `aliases` |
| Turn version management on/off | [`nvm on`](../command/nvm/on)/[`nvm off`](../command/nvm/off) (writes `enabled`) |
| Active/last version | Managed by [`nvm use`](../command/nvm/use) (`active_version`, `last_version`) |
| Shim security/V8 flags _(Governance)_ | [Registry reference](registry) (`EnforcePermissionModel`, `FreezeV8GlobalObjects`, `DisableEvalAndStringExecution`) |
| Shim security/V8 flags _(Governance)_ | [Registry reference](registry) (`EnforcePermissionModel`, `FreezeV8GlobalObjects`, `DisableEvalAndStringExecution`). Off by default: no `npm_config_node_options` write. When on, npm/npx/pnpm lifecycle scripts inherit the same flags. |
| Governance locks (mirrors, version allow/block lists, proxies) | [Administrative Templates](ad) and [registry policies](registry) — Certified Builds |

```powershell
Expand Down
6 changes: 3 additions & 3 deletions docs/cfg/enterprise/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ See [Administrative Templates](ad) for GPO and Intune deployment. Download ADMX/
|**Cache downloads**|`CacheDownloads`|**Overridable** (`cache_downloads`). Cache downloaded Node.js versions for offline reuse.<br /><br />- `0` = off/false<br />- `1` = on/true<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Default detect file**|`DefaultDetectFile`|**Overridable** (`default_detect_file`). File written when pinning a version (`nvm pin`) (shim-only).<br /><br />Default: `.nvmrc`<br /><br />`REG_SZ`|
|**Disable announcements**|`DisableAnnouncements`|**Overridable** (`disable_announcements`). Suppress project and release announcements.<br /><br />- `0` = shown<br />- `1` = hidden<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Disallow eval/string code gen**|`DisableEvalAndStringExecution`|**Overridable** (`disable_eval_and_string_execution`). Shim prepends `--disallow-code-generation-from-strings`, blocking `eval()` and `new Function()` (shim-only). Does not affect `node:vm`.<br /><br />- `0` = off<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Disallow eval/string code gen**|`DisableEvalAndStringExecution`|**Overridable** (`disable_eval_and_string_execution`). Node shim prepends `--disallow-code-generation-from-strings`, blocking `eval()` and `new Function()` (shim-only). When `1`, the package-manager proxy also merges this flag into `npm_config_node_options` for npm/npx/pnpm lifecycle scripts. Yarn, bun, corepack, and vlt are not covered. Does not set `NODE_OPTIONS`. Does not affect `node:vm`.<br /><br />- `0` = off (no env write)<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Disable NVM upgrades**|`DisableUpgrade`|**Overridable.** Block in-app NVM upgrades (does not block AD/GPO package deployment).<br /><br />- `0` = allowed<br />- `1` = blocked<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Disable version management**|`Enabled`|**Overridable** (`nvm on`/`nvm off`). Forces version management on or off. When off, NVM does not manage or redirect Node.js commands.<br /><br />- `0` = off (`nvm off`)<br />- `1` = on<br /><br />Default: `1`<br /><br />`REG_DWORD`|
|**Enforce permission model**|`EnforcePermissionModel`|**Overridable** (`enforce_permission_model`). Shim prepends Node permission-model flag on every `node.exe` launch (shim-only). Default-deny FS/network unless the process passes `--allow-*` at runtime. NVM does not inject `--allow-*` grants. NVM never injects `--permission-audit` (Node 25.8+ report-only). There is no policy that forces `--permission-audit`.<br /><br />- Node 23+: `--permission`<br />- Node 20–22: `--experimental-permission`<br />- Node &lt;20: no flag (unsupported)<br /><br />- HKLM Policies `1`: strip caller `--permission-audit` and inject `--permission` / `--experimental-permission`. Filter `--allow-*` even if the caller already passed `--permission`.<br />- Preference-only `1`: caller `--permission-audit` is a debug exception (no inject).<br /><br />- `0` = off<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Freeze V8 global objects**|`FreezeV8GlobalObjects`|**Overridable** (`freeze_v8_global_objects`). Shim prepends `--frozen-intrinsics` so built-in prototypes cannot be patched (shim-only; Node.js 12+). Adds measurable startup cost.<br /><br />- `0` = off<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Enforce permission model**|`EnforcePermissionModel`|**Overridable** (`enforce_permission_model`). Node shim prepends Node permission-model flag on `node` launches (shim-only). When `1`, the package-manager proxy also merges the same flag and `DefaultPermissionGrants` into `npm_config_node_options` for npm/npx/pnpm lifecycle scripts. npm-cli.js itself is not launched under `--permission`. Yarn, bun, corepack, and vlt are not covered. Does not set `NODE_OPTIONS`. Default-deny FS/network unless the process passes `--allow-*` at runtime. NVM does not inject `--allow-*` grants except `DefaultPermissionGrants`. NVM never injects `--permission-audit` (Node 25.8+ report-only). There is no policy that forces `--permission-audit`.<br /><br />- Node 23+: `--permission`<br />- Node 20–22: `--experimental-permission`<br />- Node &lt;20: no flag (unsupported)<br /><br />- HKLM Policies `1`: strip caller `--permission-audit` (and `--permission-audit` already in `npm_config_node_options`) and inject `--permission` / `--experimental-permission`. Filter `--allow-*` even if the caller already passed `--permission`.<br />- Preference-only `1`: caller `--permission-audit` is a debug exception for `node` (no inject). Proxy still merges `--permission` into `npm_config_node_options` without stripping existing tokens.<br /><br />- `0` = off (no env write)<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Freeze V8 global objects**|`FreezeV8GlobalObjects`|**Overridable** (`freeze_v8_global_objects`). Node shim prepends `--frozen-intrinsics` so built-in prototypes cannot be patched (shim-only; Node.js 12+). When `1`, the package-manager proxy also merges this flag into `npm_config_node_options` for npm/npx/pnpm lifecycle scripts. Yarn, bun, corepack, and vlt are not covered. Does not set `NODE_OPTIONS`. Adds measurable startup cost.<br /><br />- `0` = off (no env write)<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
|**Install root**|`InstallRoot`|**Overridable** (`root`). Directory where Node.js versions are stored. Overrides machine and user preferences.<br /><br />Default: `%LOCALAPPDATA%\Author Software\nvm\installs`<br /><br />`REG_SZ`|
|**Local install source**|`LocalInstallDir`|**Overridable** (`local_dir`). Alternate local directory for Node.js archives (air-gapped mirrors). Overrides cache.<br /><br />`REG_SZ`|
|**Local install only**|`LocalInstallOnly`|**Overridable** (`local_install_only`). Restrict installs to `LocalInstallDir` only.<br /><br />- `0` = off<br />- `1` = on<br /><br />Default: `0`<br /><br />`REG_DWORD`|
Expand Down
5 changes: 3 additions & 2 deletions docs/command/package-manager-shims.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Global CLIs installed with those managers (for example `tsc`) use the same `prox
5. Check the version directory is safe (not a reparse point, not cross-user writable) — failure → **NVM4305**.
6. Locate the delegated command under the Node install (`.exe`, then `.cmd`, then `.bat`).
7. Enforce package-manager constraints when policy applies (npm / npx / pnpm / yarn). HKLM `BlockPackageManagerLifecycleScripts` forces `--ignore-scripts` or `YARN_ENABLE_SCRIPTS=false`. Certified Builds with Advanced Logging write **NVM4412** for install-class commands only.
8. Verify trust of `node.exe` and the delegated target (below).
9. Spawn the real tool (for npm/npx/corepack: often `node.exe` + `*-cli.js`; otherwise the `.exe` / `.cmd`).
8. When `EnforcePermissionModel`, `FreezeV8GlobalObjects`, or `DisableEvalAndStringExecution` is on, merge those Node flags into `npm_config_node_options` for npm/npx/pnpm so lifecycle scripts inherit them. Default off: no env write. Does not set `NODE_OPTIONS`. Yarn, bun, corepack, and vlt are skipped. npm-cli.js itself is not launched under `--permission`.
9. Verify trust of `node.exe` and the delegated target (below).
10. Spawn the real tool (for npm/npx/corepack: often `node.exe` + `*-cli.js`; otherwise the `.exe` / `.cmd`).

Canonical binary: `{DataRoot}/proxy.exe`. Per-command shims: `{DataRoot}/.shim/{name}.exe` (hardlink or copy of `proxy.exe`).

Expand Down
6 changes: 3 additions & 3 deletions docs/guide/builds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ The Governance package for certified builds introduce policy management. With th
- Utilize corporate proxies (IWA, PAC/WPAD).
- Block unapproved Node.js Versions (i.e. EOL, vulnerable, or unstable versions).
- Require custom npm/yarn/pnpm cooldown periods.
- Enforce Node.js permission model (`--permission` / `--experimental-permission`) so each `node.exe` starts default-deny; apps must pass `--allow-*` at runtime.
- Freeze V8 intrinsics (`--frozen-intrinsics`) to prevent prototype pollution of built-ins.
- Disallow `eval()` / `new Function()` (`--disallow-code-generation-from-strings`).
- Enforce Node.js permission model (`--permission` / `--experimental-permission`) so shimmed `node` starts default-deny; npm/npx/pnpm lifecycle scripts inherit the same flags via `npm_config_node_options` when the policy is on. Apps must pass `--allow-*` at runtime.
- Freeze V8 intrinsics (`--frozen-intrinsics`) to prevent prototype pollution of built-ins (also applied to npm/npx/pnpm scripts when the policy is on).
- Disallow `eval()` / `new Function()` (`--disallow-code-generation-from-strings`) (also applied to npm/npx/pnpm scripts when the policy is on).
- Limit to local installations (airgapping).
- Restrict version installations (ex: lts/non-EOL/non-ALPHA) with the version firewall.

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ Supply-chain risk inside transitive `node_modules` remains largely an upstream r

## 4. Node permission and V8 lockdown (Governance, shim mode)

Most teams never pass Node’s permission model flags. Governance policy can force them on every shimmed launch:
Most teams never pass Node’s permission model flags. Governance policy can force them on shimmed `node` and, when at least one of these keys is on, on npm/npx/pnpm lifecycle scripts. Default off does not write `npm_config_node_options`. Yarn, bun, corepack, and vlt are not covered. NVM does not set `NODE_OPTIONS`.

| Policy | Effect |
|:-|:-|
| `EnforcePermissionModel` | Prepend `--permission` (Node 23+) or `--experimental-permission` (20–22). Default-deny FS/network until the process passes `--allow-*`. NVM does not inject grants. HKLM Policies strips caller `--permission-audit` (report-only) and still injects `--permission`. Preference-only enforce leaves `--permission-audit` as a debug exception. NVM never injects `--permission-audit`. |
| `FreezeV8GlobalObjects` | Prepend `--frozen-intrinsics` |
| `DisableEvalAndStringExecution` | Prepend `--disallow-code-generation-from-strings` (blocks `eval` / `new Function`; does not cover `node:vm`) |
| `EnforcePermissionModel` | Prepend `--permission` (Node 23+) or `--experimental-permission` (20–22) on `node`. Default-deny FS/network until the process passes `--allow-*`. NVM does not inject grants except `DefaultPermissionGrants`. HKLM Policies strips caller `--permission-audit` (report-only) and still injects `--permission`. Preference-only enforce leaves `--permission-audit` as a debug exception on `node`. Proxy merges the same flags into `npm_config_node_options` for npm/npx/pnpm; HKLM also strips `--permission-audit` from that variable. NVM never injects `--permission-audit`. |
| `FreezeV8GlobalObjects` | Prepend `--frozen-intrinsics` on `node`; same flag in `npm_config_node_options` for npm/npx/pnpm when on |
| `DisableEvalAndStringExecution` | Prepend `--disallow-code-generation-from-strings` (blocks `eval` / `new Function`; does not cover `node:vm`). Same flag in `npm_config_node_options` for npm/npx/pnpm when on |

See [Operating Modes](../features/modes) and [registry keys](../cfg/registry#available-registry-keys).

Expand Down
2 changes: 1 addition & 1 deletion i18n/ru/docusaurus-plugin-content-docs/current/cfg/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ _(не перечислены в `cfg docs`)_
| Псевдонимы версий (`stable=24.x` и т. д.) | Предпочтительно [`nvm alias`](../command/nvm/alias); значения хранятся как `aliases` |
| Включение/отключение управления версиями | [`nvm on`](../command/nvm/on)/[`nvm off`](../command/nvm/off) (записывает `enabled`) |
| Активная/последняя версия | Управляется [`nvm use`](../command/nvm/use) (`active_version`, `last_version`) |
| Безопасность shim / флаги V8 _(Governance)_ | [Справочник реестра](registry) (`EnforcePermissionModel`, `FreezeV8GlobalObjects`, `DisableEvalAndStringExecution`) |
| Безопасность shim / флаги V8 _(Governance)_ | [Справочник реестра](registry) (`EnforcePermissionModel`, `FreezeV8GlobalObjects`, `DisableEvalAndStringExecution`). По умолчанию выкл.: `npm_config_node_options` не пишется. При включении lifecycle-скрипты npm/npx/pnpm наследуют те же флаги. |
| Блокировки Governance (зеркала, списки разрешённых/заблокированных версий, прокси) | [Административные шаблоны](ad) и [политики реестра](registry) — Certified Builds |

```powershell
Expand Down
Loading
Loading