Skip to content

MSRC fixes - #341342

Merged
Kyle Cutler (kycutler) merged 1 commit into
mainfrom
kycutler/msrc-1.142-main
Oct 13, 2026
Merged

MSRC fixes#341342
Kyle Cutler (kycutler) merged 1 commit into
mainfrom
kycutler/msrc-1.142-main

Conversation

@kycutler

@kycutler Kyle Cutler (kycutler) commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Copilot AI balanced review requested due to automatic review settings October 13, 2026 17:43
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

TylerLeonhardt

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeAgent.ts

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
  • src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts
  • src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts
  • src/vs/workbench/contrib/terminal/test/common/terminalConfiguration.test.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts
  • src/vs/workbench/contrib/terminalContrib/notification/browser/terminalNotificationHandler.ts
  • src/vs/workbench/contrib/terminalContrib/notification/test/browser/terminalNotification.test.ts

@kycutler
Kyle Cutler (kycutler) enabled auto-merge (squash) October 13, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Clients can clear the sensitive-edit guard, and generated MCP sandbox files lack reliable lifecycle cleanup.

2 open findings
What changed in this PR

Hardens multiple security boundaries involving path traversal, sandbox configuration, workspace trust, terminal notifications, and Agent Host edit approvals.

Changes:

  • Strengthens URI/path containment and remote filesystem handling.
  • Scopes MCP sandbox permissions per server and isolates generated settings.
  • Adds trust and confirmation guards for terminals, notifications, and sensitive customization files.
File Description
src/​vs/​workbench/​services/​workspaces/​test/​common/​workspaceTrust.test.ts Tests remote traversal trust boundaries.
src/​vs/​workbench/​services/​userDataProfile/​test/​browser/​snippetsResource.test.ts Expands snippet traversal tests.
src/​vs/​workbench/​contrib/​webview/​test/​browser/​resourceLoading.test.ts Tests OS-specific resource containment.
src/​vs/​workbench/​contrib/​webview/​electron-browser/​webviewElement.ts Supplies remote environment service.
src/​vs/​workbench/​contrib/​webview/​browser/​webviewElement.ts Resolves remote OS before loading resources.
src/​vs/​workbench/​contrib/​webview/​browser/​resourceLoading.ts Normalizes remote paths securely.
src/​vs/​workbench/​contrib/​terminalContrib/​notification/​test/​browser/​terminalNotification.test.ts Tests nested-link sanitization.
src/​vs/​workbench/​contrib/​terminalContrib/​notification/​browser/​terminalNotificationHandler.ts Repeatedly removes reconstructed links.
src/​vs/​workbench/​contrib/​terminalContrib/​chatAgentTools/​common/​terminalSandboxService.ts Shares sandbox temp-path construction.
src/​vs/​workbench/​contrib/​terminal/​test/​common/​terminalConfiguration.test.ts Tests restricted link-scheme configuration.
src/​vs/​workbench/​contrib/​terminal/​test/​browser/​terminalInstance.test.ts Tests relaunch trust enforcement.
src/​vs/​workbench/​contrib/​terminal/​common/​terminalConfiguration.ts Restricts terminal link schemes.
src/​vs/​workbench/​contrib/​terminal/​browser/​terminalInstance.ts Gates process relaunches on trust.
src/​vs/​workbench/​contrib/​mcp/​test/​common/​mcpTypes.test.ts Tests sandbox policy merging.
src/​vs/​workbench/​contrib/​mcp/​test/​common/​mcpSandboxService.test.ts Tests per-server sandbox generation.
src/​vs/​workbench/​contrib/​mcp/​test/​common/​mcpConfigurationGeneration.test.ts Tests root/server sandbox schemas.
src/​vs/​workbench/​contrib/​mcp/​common/​mcpTypes.ts Merges shared denies with server grants.
src/​vs/​workbench/​contrib/​mcp/​common/​mcpServer.ts Uses effective server sandbox settings.
src/​vs/​workbench/​contrib/​mcp/​common/​mcpSandboxService.ts Persists per-server grants and files.
src/​vs/​workbench/​contrib/​mcp/​common/​mcpConfiguration.ts Separates root denies from server grants.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​agentHostChatContribution.test.ts Tests sensitive-location forwarding.
src/​vs/​workbench/​contrib/​chat/​common/​promptSyntax/​utils/​promptFilesLocator.ts Reuses shared location validation.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​agentHostSessionHandler.ts Synchronizes sensitive edit locations.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​agentHostChatInputPicker.ts Hides platform-owned sensitive locations.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​localAgentHostSessionsProvider.test.ts Tests Agents-window synchronization.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​baseAgentHostSessionsProvider.ts Derives and updates security config.
src/​vs/​platform/​sandbox/​common/​terminalSandboxService.ts Adds shared temp-directory helper.
src/​vs/​platform/​mcp/​common/​mcpPlatformTypes.ts Adds per-server sandbox configuration.
src/​vs/​platform/​chat/​common/​chatSettings.ts Parses sensitive customization locations.
src/​vs/​platform/​agentHost/​test/​node/​sessionPermissions.test.ts Tests sensitive-write confirmation.
src/​vs/​platform/​agentHost/​test/​node/​codex/​codexSessionConfigKeys.test.ts Updates Codex schema expectations.
src/​vs/​platform/​agentHost/​test/​node/​claudeAgent.test.ts Updates Claude schema expectations.
src/​vs/​platform/​agentHost/​test/​common/​agentHostSchema.test.ts Tests transient sensitive config.
src/​vs/​platform/​agentHost/​node/​sessionPermissions.ts Blocks auto-approval for sensitive edits.
src/​vs/​platform/​agentHost/​node/​codex/​codexAgent.ts Exposes sensitive config to Codex.
src/​vs/​platform/​agentHost/​node/​claude/​claudeAgent.ts Exposes sensitive config to Claude.
src/​vs/​platform/​agentHost/​common/​sessionConfigKeys.ts Defines transient sensitive-location key.
src/​vs/​platform/​agentHost/​common/​agentHostSchema.ts Defines sensitive-location schema.
src/​vs/​base/​test/​common/​strings.test.ts Covers Unicode substring comparison.
src/​vs/​base/​test/​common/​resources.test.ts Covers cross-platform traversal semantics.
src/​vs/​base/​common/​strings.ts Corrects Unicode substring lowercasing.
src/​vs/​base/​common/​resources.ts Hardens non-file URI containment.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kycutler
Kyle Cutler (kycutler) merged commit 0695d91 into main Oct 13, 2026
36 checks passed
@kycutler
Kyle Cutler (kycutler) deleted the kycutler/msrc-1.142-main branch October 13, 2026 18:52
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 13, 2026
Don Jayamanne (DonJayamanne) added a commit that referenced this pull request Oct 13, 2026
…xploration-vscode

* origin/main: (40 commits)
  MSRC fixes (#341342)
  chat: render input attachments for the input model's session (#341350)
  chat: center subagent tool activity hooks (#341258)
  Manage Copilot plugin marketplaces through Agent Host (#341301)
  fix: linux setuid sandbox helper permissions (#341292)
  agentHost: resolve #chat chips on the host of the chat that shows them (#341332)
  [Perf] agentHost: limit archived sessions over Mission Control (#341327)
  Remember expanded state for "Other Models" in model picker (#341335)
  Offer Stop for copilot detached background shells  (#341310)
  agentHost: allow inherited peer chats to move workspaces (#341317)
  [Perf] agentHost: reduce Mission Control relay overhead (#341223)
  Fix Customizations modal spacing (#341144)
  Fix dependency cycle in QuickInputService and EditorResolverService (#341321)
  Fix Explorer refresh on restoring deleted workspace root folder (#341323)
  chat: Share and rate-limit core utility model requests (#340100)
  agentHost: open #chat chips on the connection that owns the chat (#341313)
  Fix flaky StorageMainService tests by awaiting storage warm-up (#341305)
  agentHost: record the default chat role instead of reading the default chat URI shape (#341293)
  welcome: preserve tab icon color with Modern Icons
  Fix flaky test in diskFileSystemProvider.test.ts (#341304)
  ...

# Conflicts:
#	src/vs/platform/agentHost/node/agentService.ts
#	src/vs/platform/agentHost/node/protocolServerHandler.ts
#	src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts
#	src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts
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.

4 participants