permission: add unique warning codes - #64414
Conversation
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
RafaelGSS
left a comment
There was a problem hiding this comment.
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>
df10aff to
bdad8d7
Compare
|
Added. Also rebased on latest main |
|
Looks like this has been approved and is passing all the tests - is anything stopping it being merged? |
Commit Queue failed- Loading data for nodejs/node/pull/64414 ✔ Done loading data for nodejs/node/pull/64414 ----------------------------------- PR info ------------------------------------ Title permission: add unique warning codes (#64414) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch davidje13:codes-for-permissions-warnings -> nodejs:main Labels process, author ready, needs-ci, permission Commits 2 - permission: add unique warning codes - Add explicit test of disable-warning behaviour Committers 1 - David Evans <davidje13@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/64414 Fixes: https://github.com/nodejs/node/issues/59818 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64414 Fixes: https://github.com/nodejs/node/issues/59818 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 10 Jul 2026 23:04:36 GMT ✔ Approvals: 3 ✔ - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/64414#pullrequestreview-4754274143 ✔ - Ulises Gascón (@UlisesGascon): https://github.com/nodejs/node/pull/64414#pullrequestreview-4760099362 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/64414#pullrequestreview-4764529814 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-07-23T13:24:06Z: https://ci.nodejs.org/job/node-test-pull-request/75053/ - Querying data for job/node-test-pull-request/75053/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 64414 From https://github.com/nodejs/node * branch refs/pull/64414/merge -> FETCH_HEAD ✔ Fetched commits as 7168c6e49c4b..bdad8d740529 -------------------------------------------------------------------------------- Auto-merging lib/internal/process/pre_execution.js [main ed2567fd6d] permission: add unique warning codes Author: David Evans <davidje13@users.noreply.github.com> Date: Fri Jul 10 23:53:14 2026 +0100 2 files changed, 10 insertions(+), 12 deletions(-) [main eccf09174e] Add explicit test of disable-warning behaviour Author: David Evans <davidje13@users.noreply.github.com> Date: Tue Jul 21 23:41:19 2026 +0100 1 file changed, 14 insertions(+) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. (node:359) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use `node --trace-deprecation ...` to show where the warning was created) Rebasing (2/4) Executing: git node land --amend --yes ⚠ Found Fixes: https://github.com/nodejs/node/issues/59818, skipping.. --------------------------------- New Message ---------------------------------- permission: add unique warning codeshttps://github.com/nodejs/node/actions/runs/30471676057 |
|
Landed in d1f3d0a |
Adds unique warning codes of the form
PERM0000for all permissions-relatedSecurityWarnings, 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
DEP0000for deprecations, so this follows that convention. There are currently 2 other places which generateSecurityWarnings which should perhaps be given unique codes as well (something for a separate PR I think)Fixes: #59818