Skip to content

permission: reject empty reference in drop() - #66732

Open
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:reject-empty-reference-in-drop
Open

RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:reject-empty-reference-in-drop

Conversation

@RafaelGSS

Copy link
Copy Markdown
Member

permission: reject empty reference in drop()

An empty reference passed to process.permission.drop() fell through to
dropping the whole scope, while has() treats it as not granted. Throw
ERR_INVALID_ARG_VALUE instead, in both the JS wrapper and the binding.

An empty reference passed to process.permission.drop() fell through to
dropping the whole scope, while has() treats it as not granted. Throw
ERR_INVALID_ARG_VALUE instead, in both the JS wrapper and the binding.

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. permission Issues and PRs related to the Permission Model. labels Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.47%. Comparing base (dd7235c) to head (3b8e249).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/process/permission.js 45.45% 6 Missing ⚠️
src/permission/permission.cc 33.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66732      +/-   ##
==========================================
- Coverage   90.48%   90.47%   -0.02%     
==========================================
  Files         791      791              
  Lines      277204   277216      +12     
  Branches    53311    53310       -1     
==========================================
- Hits       250841   250803      -38     
- Misses      16760    16812      +52     
+ Partials     9603     9601       -2     
Files with missing lines Coverage Δ
src/permission/permission.cc 74.28% <33.33%> (-0.20%) ⬇️
lib/internal/process/permission.js 88.46% <45.45%> (-4.10%) ⬇️

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

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. permission Issues and PRs related to the Permission Model.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants