Skip to content

Restrict remote app settings writes - #395

Closed
shanselman with Copilot wants to merge 3 commits into
masterfrom
copilot/deep-review-c8-app-settings-validation
Closed

shanselman with Copilot wants to merge 3 commits into
masterfrom
copilot/deep-review-c8-app-settings-validation

Conversation

Copilot AI commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

app.settings.set allowed MCP and gateway callers to mutate arbitrary settings, including connection credentials and node/MCP enablement flags. This narrows the remote write surface to explicitly approved cosmetic and capability preference settings.

  • Remote write allowlist
    • Added a shared AppCapability.RemoteWritableSettings allowlist.
    • Rejects non-allowlisted writes before invoking the settings delegate.
if (!_remoteWritableSettings.Contains(name))
    return Error($"Setting not remotely writable: {name}");
  • Sensitive settings blocked

    • Denies remote mutation of settings such as GatewayUrl, BootstrapToken, Token, EnableMcpServer, EnableNodeMode, ScreenRecordingConsentGiven, and dpapi:-style paths.
  • Single source of truth

    • Reuses the shared allowlist from tray wiring so settings get/set exposure stays consistent.
  • Focused coverage

    • Added AppCapability tests for rejected sensitive keys and an allowed setting path.

Copilot AI and others added 2 commits May 14, 2026 21:22
Copilot AI changed the title [WIP] Fix validation for arbitrary keys in app.settings.set Restrict remote app settings writes May 14, 2026
Copilot AI requested a review from shanselman May 14, 2026 21:27
@shanselman

Copy link
Copy Markdown
Collaborator

Closing this automation implementation as stale/superseded after the post-refactor triage. The underlying signal is preserved in #348 and the tracker update in #372: remote settings validation remains open, but this Copilot SWE draft predates the current architecture.

@shanselman shanselman closed this May 18, 2026
@shanselman
shanselman deleted the copilot/deep-review-c8-app-settings-validation branch September 7, 2026 06:30
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.

[deep-review] C8: app.settings.set over MCP accepts arbitrary keys without validation

2 participants