Repository navigation
fix(validation): support nested Git worktrees without leaking linked private files (#663) - #667
Merged
Merged
Conversation
5 tasks
Collaborator
Author
Independent post-publication reviewReviewed exact HEAD Security / compatibility
Validation
No dropped or misrepresented work found. Draft only; no approval, merge, release, or live installation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related to #663. Validation differs for otherwise identical worktrees placed below
.git: Biome omits React domain inference, and Vite's absolute**/.git/**denial matches the checkout's ancestor and prevents jsdom tests from loading ordinary source modules. Paired inside/outside probes used the same revision, dependencies, lockfile, and relative test filter.Value
Make isolated worktree validation reproducible without deleting existing suppressions or globally allowing Git metadata.
Approach
Move disposable Windows fixtures out of TEMP short-path aliases such as RUNNER~1. Vite intentionally rejects these aliases before its deny matcher; retain that restriction, strict allowlists and sensitive-target denial. Unix continues using the ordinary temporary directory.
Explicitly enable Biome's recommended React domain for web UI TS/TSX files.
For Vitest roots nested under
.git, wrap the resolved filesystem-denial matcher so ordinary checkout files are matched relative to that root while.gitcomponents inside the checkout remain denied.Check both lexical paths and read-only realpaths, preserving strict filesystem access and the original matcher for targets outside the root. This fixes an independently reproduced HTTP leak through a nonsensitive alias to a sensitive target. Missing paths retain ordinary 404 responses; other realpath failures deny access. The development web server configuration is unchanged.
Add paired Git-worktree and real Vite matcher regressions; document the investigation in
docs/research/WORKTREE_VALIDATION_663.md.Validation
Current head:
00025148.bun run checkpassed; HTTP/worktree regressions passed 2/2; process-group coverage and real Pi setup fixture passed 5/5.git merge-treeagainst main94f6dfb2found no conflicts.Impact
fsDenyGlobhook and fails closed if that hook disappears; future upgrades need review.