Skip to content

permission: block FileHandle fsync and fdatasync - #65431

Open
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:permission-filehandle-fsync
Open

permission: block FileHandle fsync and fdatasync#65431
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:permission-filehandle-fsync

Conversation

@RafaelGSS

Copy link
Copy Markdown
Member

With the Permission Model enabled, the top-level fs.fsync() and fs.fdatasync() APIs are disabled because operations on already-open file descriptors cannot be tied to path grants, but the equivalent FileHandle methods remained available. Disable FileHandle.sync() and FileHandle.datasync() for consistency and document the behavior.

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 fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (e7904d4) to head (36a4f47).
⚠️ Report is 356 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65431      +/-   ##
==========================================
- Coverage   90.14%   90.12%   -0.03%     
==========================================
  Files         746      752       +6     
  Lines      242764   252327    +9563     
  Branches    45739    47469    +1730     
==========================================
+ Hits       218848   227399    +8551     
- Misses      15426    16221     +795     
- Partials     8490     8707     +217     
Files with missing lines Coverage Δ
lib/internal/fs/promises.js 92.28% <100.00%> (-0.73%) ⬇️

... and 254 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 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. permission Issues and PRs related to the Permission Model labels Aug 20, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2026
@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

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fs Issues and PRs related to the fs subsystem / file system. 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.

3 participants