Skip to content

vfs: resolve symlinks when checking rename descendants - #65904

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-rename-dir-symlink
Open

vfs: resolve symlinks when checking rename descendants#65904
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-rename-dir-symlink

Conversation

@trivikr

@trivikr trivikr commented Sep 8, 2026

Copy link
Copy Markdown
Member

Fixes: #65903

Check resolved source and destination parent paths before renaming a directory to prevent moving it into its own subtree through a symlink.


Assisted-by: codex

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Sep 8, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.22%. Comparing base (0de4fcc) to head (7510763).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65904      +/-   ##
==========================================
+ Coverage   90.17%   90.22%   +0.05%     
==========================================
  Files         771      771              
  Lines      265470   265475       +5     
  Branches    50463    50512      +49     
==========================================
+ Hits       239383   239531     +148     
+ Misses      17055    16906     -149     
- Partials     9032     9038       +6     
Files with missing lines Coverage Δ
lib/internal/vfs/providers/memory.js 95.86% <100.00%> (+0.86%) ⬆️

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

Check resolved source and destination parent paths before renaming a
directory to prevent moving it into its own subtree through a symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex
@trivikr
trivikr force-pushed the vfs-rename-dir-symlink branch from 648406e to 7510763 Compare September 11, 2026 03:40
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr
trivikr requested a review from mcollina September 11, 2026 16:52

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions github-actions Bot added request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Sep 11, 2026
@github-actions

This comment was marked as outdated.

@trivikr trivikr added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. and removed request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. labels Sep 11, 2026
@nodejs-github-bot nodejs-github-bot added the lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: renaming a directory through a symlink into its descendant detaches the subtree

3 participants