Skip to content

fix(built-in-tools): resolve symlink dir containment before probing it#387

Open
herikwebb wants to merge 1 commit into
plmbr:mainfrom
herikwebb:promote/security/fix-search-files-symlink-workspace-20260704140058
Open

fix(built-in-tools): resolve symlink dir containment before probing it#387
herikwebb wants to merge 1 commit into
plmbr:mainfrom
herikwebb:promote/security/fix-search-files-symlink-workspace-20260704140058

Conversation

@herikwebb

Copy link
Copy Markdown
Contributor

_explicit_descendable stat'd an outbound symlink's target via
is_dir(follow_symlinks=True) before the workspace-containment check.
Resolve the path first, reject anything outside the workspace, and only
os.path.isdir() an in-workspace target -- so an outbound symlink is never
stat-followed past the boundary during enumeration. Behavior is unchanged
(verified: 13 sandbox tests pass, 1300+ fuzz trials match Path.glob).

_explicit_descendable stat'd an outbound symlink's target via
is_dir(follow_symlinks=True) before the workspace-containment check.
Resolve the path first, reject anything outside the workspace, and only
os.path.isdir() an in-workspace target -- so an outbound symlink is never
stat-followed past the boundary during enumeration. Behavior is unchanged
(verified: 13 sandbox tests pass, 1300+ fuzz trials match Path.glob).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant