Skip to content

fs: do not descend into symlinks for ** unless following symlinks - #65435

Open
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:glob-no-follow-symlink-globstar
Open

fs: do not descend into symlinks for ** unless following symlinks#65435
RafaelGSS wants to merge 1 commit into
nodejs:mainfrom
RafaelGSS:glob-no-follow-symlink-globstar

Conversation

@RafaelGSS

Copy link
Copy Markdown
Member

fs.glob(), fs.globSync(), and fs.promises.glob() descended into symlinked directories for globstar patterns even when followSymlinks was false. Restrict globstar recursion to directories so the default behavior and an explicit false value do not traverse symlink targets.

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
@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
@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. 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 (5ba7e05) to head (b90e6fc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65435      +/-   ##
==========================================
- Coverage   91.85%   90.12%   -1.73%     
==========================================
  Files         400      752     +352     
  Lines      179110   252321   +73211     
  Branches    27351    47459   +20108     
==========================================
+ Hits       164522   227414   +62892     
- Misses      14258    16219    +1961     
- Partials      330     8688    +8358     
Files with missing lines Coverage Δ
lib/internal/fs/glob.js 91.27% <100.00%> (+3.32%) ⬆️

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

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants