Skip to content

permission: add unique warning codes#64414

Open
davidje13 wants to merge 2 commits into
nodejs:mainfrom
davidje13:codes-for-permissions-warnings
Open

permission: add unique warning codes#64414
davidje13 wants to merge 2 commits into
nodejs:mainfrom
davidje13:codes-for-permissions-warnings

Conversation

@davidje13

Copy link
Copy Markdown
Contributor

Adds unique warning codes of the form PERM0000 for all permissions-related SecurityWarnings, so that they can be individually (and minimally) silenced if required, e.g. --disable-warning=PERM0002. See #59818 (comment) for an example use-case.

There isn't much of an existing pattern for warning codes, except DEP0000 for deprecations, so this follows that convention. There are currently 2 other places which generate SecurityWarnings which should perhaps be given unique codes as well (something for a separate PR I think)

Fixes: #59818

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Jul 10, 2026
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.13%. Comparing base (db3a8d8) to head (bdad8d7).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64414      +/-   ##
==========================================
- Coverage   90.14%   90.13%   -0.01%     
==========================================
  Files         741      741              
  Lines      242133   242131       -2     
  Branches    45568    45563       -5     
==========================================
- Hits       218265   218248      -17     
+ Misses      15371    15370       -1     
- Partials     8497     8513      +16     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 97.93% <100.00%> (-0.01%) ⬇️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RafaelGSS RafaelGSS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add a test for --disable-warning for this too.

Adds unique warning codes of the form PERM0000 for all permissions
related SecurityWarnings, so that they can be individually silenced
if required.

Fixes: nodejs#59818
Signed-off-by: David Evans <davidje13@users.noreply.github.com>
@davidje13
davidje13 force-pushed the codes-for-permissions-warnings branch from df10aff to bdad8d7 Compare July 21, 2026 23:08
@davidje13

Copy link
Copy Markdown
Contributor Author

Added. Also rebased on latest main

@RafaelGSS RafaelGSS added request-ci Add this label to start a Jenkins CI on a PR. permission Issues and PRs related to the Permission Model labels Jul 22, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 22, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. permission Issues and PRs related to the Permission Model process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specific code for "The flag X must be used with extreme caution"

5 participants