Repository navigation
Add staff-only preview setting for /security-review secret detection - #348068
Merged
Bhavya U (bhavyaus) merged 1 commit intoNov 13, 2026
Merged
Conversation
Ross Wollman (rwoll)
previously approved these changes
Nov 13, 2026
Adds `chat.copilot.securityReview.secretDetection.enabled` (preview, off by default), registered only for internal accounts. When on, Copilot SDK sessions send the runtime's `SECURITY_REVIEW_FINE_TUNED_MODEL` feature flag on create and resume. - The flag is always sent as an explicit boolean. - The agent host sends `true` only when the session's own account resolves as internal, and fails closed. The workbench forwards the setting and the organization's preview-features policy. - Allows the runtime's `submit_security_review_scope` built-in, which the runtime registers only for the security-review subagent when the flag is on. Co-authored-by: Copilot <[email protected]>
Bhavya U (bhavyaus)
force-pushed
the
bhavyaus/security-review-secret-detection
branch
from
November 13, 2026 05:20
0b08bb0 to
8f9c0c2
Compare
Bhavya U (bhavyaus)
enabled auto-merge (squash)
November 13, 2026 05:26
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical authorization gaps allow settings to bypass the session account’s preview policy and leave the fine-tuned model enabled after credentials switch to an external account.
2 open issues
What changed in this PR
Adds an off-by-default, staff-only preview setting for detecting unstructured credentials during /security-review in Copilot SDK sessions.
Changes:
- Registers the setting for internal accounts and forwards the opt-in subject to the workbench’s preview policy.
- Sends an explicit runtime flag on session creation and resume, gated by an internal-account lookup.
- Allows the security-review scope-submission tool and updates configuration and launch tests.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCopilotCliSettingsContribution.test.ts |
Tests setting forwarding and preview-policy changes. |
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts |
Registers and removes the setting based on internal-account status. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostCopilotCliSettingsContribution.ts |
Forwards the policy-filtered opt-in to host configuration. |
src/vs/platform/agentHost/test/node/providerIntegration/copilotBuiltinToolAllowlist.integrationTest.ts |
Records the subagent-only tool as unexercised. |
src/vs/platform/agentHost/test/node/copilotSessionLauncherTestHelpers.ts |
Supplies the launcher’s new API-service dependency. |
src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts |
Tests account gating and updates explicit-flag expectations. |
src/vs/platform/agentHost/test/node/copilotAgent.test.ts |
Updates expected session feature flags. |
src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts |
Checks internal status and sets the runtime flag explicitly. |
src/vs/platform/agentHost/node/copilot/copilotBuiltinToolAllowlist.ts |
Allows submit_security_review_scope. |
src/vs/platform/agentHost/common/copilotCliConfig.ts |
Defines the setting identifier and default-disabled host schema. |
Review effort: Balanced
Bryan Chen (bryanchen-d)
approved these changes
Nov 13, 2026
Bhavya U (bhavyaus)
deleted the
bhavyaus/security-review-secret-detection
branch
November 13, 2026 06:35
Anthony Kim (anthonykim1)
added a commit
that referenced
this pull request
Nov 13, 2026
Resolve the conflict in chat.shared.contribution.ts by importing both CopilotSecurityReviewSecretDetectionEnabledSettingId from main (#348068) and AgentHostCopilotShellAuthenticationEnabledSettingId from this branch.
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.

Adds a preview setting that lets internal users turn on the Copilot runtime's secret detection model in
/security-review. The model finds unstructured credentials, such as plain-text passwords that have no recognizable token format.What changed
chat.copilot.securityReview.secretDetection.enabled, taggedpreviewand off by default. It is registered only for internal accounts, so other users never see it.SECURITY_REVIEW_FINE_TUNED_MODELas an explicit boolean on create and resume, so nothing outside this setting can turn the feature on.trueonly when the setting is on and the session's own account resolves as internal; if that lookup fails, it isfalse. Root config is shared across windows and can be edited through host settings, so the workbench forwards only the setting and the organization's preview-features policy, asLocalMemorydoes.submit_security_review_scope. The runtime registers it only for the security-review subagent and only when the flag is on, so the main session's tool list and the prompt baselines don't change.copilotBuiltinToolAllowlist.integrationTest.tslists it underNOT_EXERCISED.Validation
copilotSessionLauncher.test.ts,copilotAgent.test.ts,agentHostCopilotCliSettingsContribution.test.tsandcopilotBuiltinToolAllowlist.integrationTest.tspass. The new launcher test fails without the agent host check.submit_security_review_scope.Follow-ups