chat: require confirmation for .mcp.json and .npmrc edits - #332639
Merged
Conversation
Updates edit approval patterns so edits to `.mcp.json` require user confirmation in both edit execution paths. - Adds `.mcp.json` to the standard chat edit confirmation patterns. - Adds `.mcp.json` to the agent host edit confirmation patterns. - Extends focused tests for both edit execution paths. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Protects .mcp.json edits by requiring confirmation across both chat edit execution paths.
Changes:
- Adds
.mcp.jsonto mandatory edit-confirmation patterns. - Extends focused tests for standard and Agent Host editing.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/chat/common/chatSettings.ts |
Protects .mcp.json in shared Agent Host patterns. |
src/vs/platform/agentHost/test/node/sessionPermissions.test.ts |
Tests Agent Host confirmation behavior. |
extensions/copilot/src/extension/tools/node/editFileToolUtils.tsx |
Protects .mcp.json in extension edit checks. |
extensions/copilot/src/extension/tools/node/test/editFileToolUtils.spec.ts |
Tests extension confirmation behavior. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
Adds `.mcp.json` to the existing non-canonical casing coverage for protected edit paths. (Commit message generated by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat .npmrc files as non-overridable protected edit targets in both chat approval paths, with root and nested-path coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt
approved these changes
Aug 26, 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.
Updates edit approval patterns so edits to
.mcp.jsonand.npmrcfiles require user confirmation in both edit execution paths..mcp.jsonand.npmrcto the non-overridable chat edit confirmation patterns..npmrcfiles, including explicit user auto-approval overrides.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com