Skip to content

fix(vscode): validate webview openFile paths#388

Open
wuyua9 wants to merge 1 commit into
zilliztech:masterfrom
wuyua9:devb/validate-webview-openfile-path
Open

fix(vscode): validate webview openFile paths#388
wuyua9 wants to merge 1 commit into
zilliztech:masterfrom
wuyua9:devb/validate-webview-openfile-path

Conversation

@wuyua9

@wuyua9 wuyua9 commented May 31, 2026

Copy link
Copy Markdown

Summary

  • resolve semantic search webview openFile targets against the active workspace root before opening them
  • reject empty, non-string, absolute, or .. paths that would leave the workspace
  • keep normal in-workspace search results opening as before

Tests

  • Built core declarations with ./node_modules/.bin/tsc -p packages/core/tsconfig.json
  • Ran ./node_modules/.bin/tsc -p packages/vscode-extension/tsconfig.json --noEmit
  • Ran a direct Node regression check for resolveWorkspaceFilePath covering normal paths, normalized in-workspace paths, ../ escapes, absolute paths, empty values, and non-string values

Note: local pnpm install --frozen-lockfile completed dependency extraction but exited on the local pnpm 11 ignored-build approval policy, so validation used the installed toolchain directly.

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