Skip to content

Add terminal sandbox write allow list#314270

Merged
dileepyavan merged 1 commit intomicrosoft:release/1.119from
dileepyavan:DileepY/313796
May 4, 2026
Merged

Add terminal sandbox write allow list#314270
dileepyavan merged 1 commit intomicrosoft:release/1.119from
dileepyavan:DileepY/313796

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

@dileepyavan dileepyavan commented May 4, 2026

fixes #313796

Copilot AI review requested due to automatic review settings May 4, 2026 22:52
@dileepyavan dileepyavan enabled auto-merge (squash) May 4, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the terminal sandbox configuration generation to support a command-specific write allow-list, and uses it to permit Node-related commands to write into ~/.volta/ while keeping the default sandbox config unchanged until command keywords are parsed.

Changes:

  • Add a new terminalSandboxWriteAllowList.ts helper that maps parsed command keywords to write-allowed paths.
  • Update TerminalSandboxService to incorporate command-specific write allow-list paths into filesystem.allowWrite (and thus into allowRead via the existing “allowWrite implies allowRead” behavior).
  • Extend existing unit tests to validate the presence/absence of ~/.volta/ in allowWrite before/after parsing Node vs Git command keywords.
Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts Adds assertions covering command-specific write allow-list behavior for Node vs Git keywords.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxWriteAllowList.ts Introduces keyword→operation mapping and operation→write-paths resolution (currently for Node, allowing ~/.volta/).
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts Wires the new write allow-list into sandbox config generation and renames the cached keyword list to reflect broader use.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

@dileepyavan dileepyavan merged commit f4f565c into microsoft:release/1.119 May 4, 2026
29 of 30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone May 4, 2026
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.

3 participants