Skip to content

chat: require confirmation for .mcp.json and .npmrc edits - #332639

Merged
Connor Peet (connor4312) merged 4 commits into
mainfrom
connor4312/mcp-edit-confirmation
Aug 26, 2026
Merged

chat: require confirmation for .mcp.json and .npmrc edits#332639
Connor Peet (connor4312) merged 4 commits into
mainfrom
connor4312/mcp-edit-confirmation

Conversation

@connor4312

@connor4312 Connor Peet (connor4312) commented Aug 25, 2026

Copy link
Copy Markdown
Member

Updates edit approval patterns so edits to .mcp.json and .npmrc files require user confirmation in both edit execution paths.

  • Adds .mcp.json and .npmrc to the non-overridable chat edit confirmation patterns.
  • Adds the same protections to the Agent Host edit approval path.
  • Covers root and nested .npmrc files, including explicit user auto-approval overrides.
  • Extends focused tests for both edit execution paths.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

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>
Copilot AI balanced review requested due to automatic review settings August 25, 2026 21:47
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) August 25, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Protects .mcp.json edits by requiring confirmation across both chat edit execution paths.

Changes:

  • Adds .mcp.json to 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>
@connor4312 Connor Peet (connor4312) changed the title chat: require confirmation for .mcp.json edits chat: require confirmation for .mcp.json and .npmrc edits Aug 25, 2026
@connor4312
Connor Peet (connor4312) merged commit dc51f4a into main Aug 26, 2026
37 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/mcp-edit-confirmation branch August 26, 2026 02:28
@vs-code-engineering vs-code-engineering Bot added this to the 1.136.0 milestone Aug 26, 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