Skip to content

doc: document --permission-audit audit mode behavior - #64791

Open
edsadr wants to merge 1 commit into
nodejs:mainfrom
edsadr:permissions-docs
Open

doc: document --permission-audit audit mode behavior#64791
edsadr wants to merge 1 commit into
nodejs:mainfrom
edsadr:permissions-docs

Conversation

@edsadr

@edsadr edsadr commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Expand the documentation for the --permission-audit flag, which was fixed in 51c09ea to no longer throw ERR_ACCESS_DENIED on denied operations. The previous docs only had a two-sentence description in cli.md and no mention in the permissions guide or process.permission API docs.

  • permissions.md: add enforce vs audit mode overview, a new "Audit Mode" subsection listing the diagnostics channel names (node:permission-model:*) and the { permission, resource } message shape, and a usage example. Update the Runtime API section to mention both --permission and --permission-audit.
  • cli.md: expand the --permission-audit section to clarify that --permission is not required, --allow-* flags are not needed, errors are not thrown, and --permission takes precedence when both are set. Add a cross-reference from --permission to --permission-audit.
  • process.md: note that process.permission is available under both flags, and clarify permission.has() and permission.drop() behavior in audit mode.
  • node.1: regenerated via make node.1.

Refs: #64426

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jul 27, 2026
edsadr added a commit to edsadr/node that referenced this pull request Jul 27, 2026
Expand the documentation for the --permission-audit flag, which was
fixed in 51c09ea to no longer throw ERR_ACCESS_DENIED on denied
operations. The previous docs only had a two-sentence description in
cli.md and no mention in the permissions guide or process.permission
API docs.

- permissions.md: add enforce vs audit mode overview, a new "Audit Mode"
  subsection listing the diagnostics channel names (node:permission-model:*)
  and the { permission, resource } message shape, and a usage example.
  Update the Runtime API section to mention both --permission and
  --permission-audit.
- cli.md: expand the --permission-audit section to clarify that
  --permission is not required, --allow-* flags are not needed, errors
  are not thrown, and --permission takes precedence when both are set.
  Add a cross-reference from --permission to --permission-audit.
- process.md: note that process.permission is available under both flags,
  and clarify permission.has() and permission.drop() behavior in audit
  mode.
- node.1: regenerated via `make node.1`.

Refs: nodejs#64426
PR-URL: nodejs#64791
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
@edsadr
edsadr force-pushed the permissions-docs branch from 5966cc4 to 232dbbb Compare July 27, 2026 22:40
Expand the documentation for the --permission-audit flag, which was
fixed in 51c09ea to no longer throw ERR_ACCESS_DENIED on denied
operations. The previous docs only had a two-sentence description in
cli.md and no mention in the permissions guide or process.permission
API docs.

- permissions.md: add enforce vs audit mode overview, a new
  "Audit Mode" subsection listing the diagnostics channel names
  (node:permission-model:*) and the { permission, resource } message
  shape, and a usage example. Update the Runtime API section to
  mention both --permission and --permission-audit.
- cli.md: expand the --permission-audit section to clarify that
  --permission is not required, --allow-* flags are not needed,
  errors are not thrown, and --permission takes precedence when both
  are set. Add a cross-reference from --permission to
  --permission-audit.
- process.md: note that process.permission is available under both
  flags, and clarify permission.has() and permission.drop() behavior
  in audit mode.
- node.1: regenerated via `make node.1`.

Refs: nodejs#64426
PR-URL: nodejs#64791
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
@edsadr
edsadr force-pushed the permissions-docs branch from 232dbbb to 8b4a92b Compare July 27, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants