You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Glob tool (packages/core/src/tool/glob.ts, line ~57-58) and Grep tool (packages/core/src/tool/grep.ts, line ~78) accept an optional path parameter that is passed directly to path.resolve(location.directory, input.path ?? ".") without validating whether the resolved path escapes the active Location directory.
Unlike the Read tool which uses FSUtil.contains to restrict file access within the Location boundary, Glob and Grep have no such check. The permission assertion only validates the search pattern, not the search path.
Glob/Grep should share the same location-boundary check as Read. Resolve the requested path, canonicalize symlinks where possible, and reject any search root outside the active Location unless the user grants an explicit broader scope.
The tool result should distinguish "no matches" from "search root rejected." Regression cases: .. traversal, symlink escape, absolute path outside workspace, allowed subdirectory, and Windows drive-letter/case variants. Search tools are read tools, but they still expose filesystem contents.
Activity
Necmttn commentedon Jun 21, 2026
Glob/Grep should share the same location-boundary check as Read. Resolve the requested path, canonicalize symlinks where possible, and reject any search root outside the active Location unless the user grants an explicit broader scope.
The tool result should distinguish "no matches" from "search root rejected." Regression cases:
..traversal, symlink escape, absolute path outside workspace, allowed subdirectory, and Windows drive-letter/case variants. Search tools are read tools, but they still expose filesystem contents.Generated with ax.
rekram1-node commentedon Jun 22, 2026
STOP SPAMMING ISSUES.