Skip to content

chat: enforce managed customization lockdown - #327843

Merged
joshspicer merged 5 commits into
mainfrom
agents/vscode-issue-8464-implementation
Jul 31, 2026
Merged

joshspicer merged 5 commits into
mainfrom
agents/vscode-issue-8464-implementation

Conversation

@joshspicer

@joshspicer joshspicer commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes https://github.com/microsoft/vscode-internalbacklog/issues/8464

Summary

Adds VS Code-native enforcement for exactly three boolean managed-settings controls:

  • strictPluginOnlyCustomization
  • allowManagedMcpServersOnly
  • allowManagedHooksOnly

allowedMcpServers and deniedMcpServers are pre-existing managed-settings data. This change does not add them as controls; allowManagedMcpServersOnly only changes which existing allowlist layer is authoritative.

Code changes

  • Registers the three boolean managed-settings keys in the existing policy pipeline and adds hidden policy-backed configuration delivery slots.
  • Blocks standalone user/workspace skills, agents, hooks, and MCP collections when strictPluginOnlyCustomization is true, while preserving eligible plugin contributions.
  • Prevents blocked standalone hook files and custom-agent frontmatter hooks from reaching execution.
  • Under allowManagedHooksOnly, accepts plugin hooks only when managed enabledPlugins explicitly force-enables that plugin.
  • Under allowManagedMcpServersOnly, uses only the policy-provided existing MCP allowlist as the positive allow source, while continuing to compose deny entries restrictively.
  • Uses explicit MCP collection provenance so extension collection IDs cannot spoof plugin origin.
  • Regenerates the policy catalog and adds regression coverage for provenance, dynamic policy updates, and bypass paths.

This PR intentionally covers VS Code-native enforcement only; it does not forward these settings into Copilot CLI or SDK sessions.

Validation

  • npm run typecheck-client
  • npm run gulp compile-client
  • 201 targeted policy, prompt, plugin, hook, and MCP unit tests
  • changed-file hygiene checks
  • clean-profile policy export

Copilot AI review requested due to automatic review settings July 28, 2026 15:47

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

Adds enterprise-managed lockdown controls for chat customizations, hooks, and MCP servers.

Changes:

  • Registers and normalizes new managed policies.
  • Enforces restrictions across prompt and MCP discovery.
  • Adds policy documentation and tests.
Show a summary per file
File Description
managedSettings.test.ts Tests server-setting adaptation.
managedSettings.ts Adds managed response fields.
mcpRegistry.test.ts Tests MCP collection lockdown.
mcpTypes.ts Adds plugin provenance metadata.
mcpRegistry.ts Filters blocked MCP collections.
pluginMcpDiscovery.ts Marks plugin MCP collections.
promptsService.test.ts Tests customization and hook restrictions.
agentPluginEnablement.test.ts Tests policy-forced plugins.
customizationLockdown.test.ts Tests lockdown helpers.
promptsServiceImpl.ts Enforces prompt and hook policies.
AGENTS_PLUGINS.md Documents enterprise controls.
agentPluginEnablement.ts Detects policy-forced plugins.
customizationLockdown.ts Defines shared lockdown logic.
chat.shared.contribution.ts Registers configuration policies.
fileManagedSettingsService.test.ts Tests normalization behavior.
copilotManagedSettings.ts Defines and encodes managed settings.
allowedMcpServersService.test.ts Tests authoritative allowlists.
allowedMcpServersService.ts Enforces managed MCP allowlists.
policyData.jsonc Updates generated policy metadata.

Review details

  • Files reviewed: 19/19 changed files
  • Comments generated: 3
  • Review effort level: Medium

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Base: dd3c36b8 Current: 1bd8c8d7

No screenshot changes.

@joshspicer
joshspicer marked this pull request as ready for review July 30, 2026 22:47
@joshspicer
joshspicer force-pushed the agents/vscode-issue-8464-implementation branch from 4b62d6a to 3f52d22 Compare July 30, 2026 22:49
roblourens
roblourens previously approved these changes Jul 30, 2026
Block standalone instruction and agent-instruction files when strict plugin-only customization is enforced, while preserving plugin instructions.

Co-authored-by: Copilot <[email protected]>
@joshspicer
joshspicer merged commit fc931f5 into main Jul 31, 2026
61 of 65 checks passed
@joshspicer
joshspicer deleted the agents/vscode-issue-8464-implementation branch July 31, 2026 18:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 31, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants