Skip to content

[cherry-pick] Changes to remove '.' from allowRead and allowWrite#314259

Merged
dileepyavan merged 5 commits intomicrosoft:release/1.119from
dileepyavan:DileepY/314056-release-1.119
May 5, 2026
Merged

[cherry-pick] Changes to remove '.' from allowRead and allowWrite#314259
dileepyavan merged 5 commits intomicrosoft:release/1.119from
dileepyavan:DileepY/314056-release-1.119

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

@dileepyavan dileepyavan commented May 4, 2026

fixes #312717
Cherry-picks all commits from DileepY/314056 to release/1.119.

Cherry-picked commits:

  • 550e686 Changes to remove '.' from allowRead and allowWrite
  • 2951df5 fixing tests

Validation:

  • ./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts --grep "^TerminalSandboxService - network domains should deny home reads while reallowing writable paths for reads$" → 1 passing

dileepyavan and others added 3 commits May 4, 2026 15:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 6688469)
(cherry picked from commit 2951df5)
Copilot AI review requested due to automatic review settings May 4, 2026 22:20
@dileepyavan dileepyavan enabled auto-merge (squash) May 4, 2026 22:22
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

Cherry-picks a fix into release/1.119 to tighten the terminal agent sandbox filesystem defaults by removing permissive '.'-based write allowances (and associated read re-allows), aligning sandbox behavior with the intended “workspace + sandbox temp dir” baseline.

Changes:

  • Update agent sandbox filesystem configuration defaults for Linux/macOS allowWrite from ['.'] to [] (and adjust Linux description).
  • Remove the implicit default write path (~/.npm) from TerminalSandboxService.
  • Update sandbox tests to match the new allowRead/allowWrite behavior.
Show a summary per file
File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts Removes expectation that /home/user/.npm is re-allowed for reads by default.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.ts Drops ~/.npm from default write paths; default writes now come from workspace folders + sandbox temp dir only.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts Changes allowWrite defaults to [] and updates Linux setting description.

Copilot's findings

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dmitrivMS
dmitrivMS previously approved these changes May 4, 2026
@dileepyavan
Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

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

4 participants