Changes to remove '.' from allowRead and allowWrite#314230
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes overly-broad default filesystem write allowances from the terminal tool’s sandbox configuration to prevent unintended access to user home files (e.g. ~/.bashrc) in sandboxed agent terminal executions.
Changes:
- Remove the implicit default write allow-list (previously included
~/.npm) from the terminal sandbox service. - Change the default sandbox filesystem
allowWritesetting on Linux/macOS from['.']to[](more restrictive by default).
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts | Removes default writable home path(s) so sandbox configs no longer implicitly re-allow home subpaths via write settings. |
| src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts | Tightens Linux/macOS configuration defaults by removing '.' from allowWrite defaults. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts:620
- Same as Linux: the macOS
allowWritesetting description says "Leave empty to disallow all writes", but the implementation always includes workspace folders (and the sandbox temp dir) inallowWrite. The description should clarify what remains writable when the list is empty.
allowWrite: {
type: 'array',
description: localize('agentSandbox.macFileSystemSetting.allowWrite', "Array of paths to allow write access. Leave empty to disallow all writes."),
items: { type: 'string' },
default: []
- Files reviewed: 2/2 changed files
- Comments generated: 2
Contributor
Screenshot ChangesBase: Changed (6)Errored (18)Fixtures that failed to render — no screenshot was produced.
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dmitrivMS
previously approved these changes
May 4, 2026
justschen
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 #314056