Skip to content

permission: add unique warning codes#64414

Open
davidje13 wants to merge 1 commit into
nodejs:mainfrom
davidje13:codes-for-permissions-warnings
Open

permission: add unique warning codes#64414
davidje13 wants to merge 1 commit 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

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>
@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.24%. Comparing base (ab41cf0) to head (df10aff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64414      +/-   ##
==========================================
+ Coverage   90.23%   90.24%   +0.01%     
==========================================
  Files         741      741              
  Lines      241339   241337       -2     
  Branches    45464    45472       +8     
==========================================
+ Hits       217766   217805      +39     
+ Misses      15132    15085      -47     
- Partials     8441     8447       +6     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 97.93% <100.00%> (-0.01%) ⬇️

... and 33 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.

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. 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"

2 participants