Add terminal sandbox write allow list#314270
Merged
dileepyavan merged 1 commit intomicrosoft:release/1.119from May 4, 2026
Merged
Add terminal sandbox write allow list#314270dileepyavan merged 1 commit intomicrosoft:release/1.119from
dileepyavan merged 1 commit intomicrosoft:release/1.119from
Conversation
Contributor
There was a problem hiding this comment.
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.tshelper that maps parsed command keywords to write-allowed paths. - Update
TerminalSandboxServiceto incorporate command-specific write allow-list paths intofilesystem.allowWrite(and thus intoallowReadvia the existing “allowWrite implies allowRead” behavior). - Extend existing unit tests to validate the presence/absence of
~/.volta/inallowWritebefore/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
dmitrivMS
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #313796