GitHub Copilot Adds On-Demand Secret Scanning to Code Reviews
GitHub Copilot now includes GitHub secret scanning in its security review specialist, making it easier for developers and agents to detect exposed secrets in code changes across Copilot CLI, app, SDK integrations, and code review workflows.
What changed?
GitHub Copilot's security review specialist now runs GitHub secret scanning as part of its automated review process. This capability is available in public preview across Copilot CLI, the Copilot app, Copilot SDK integrations, and Copilot code review. When enabled, secret scanning reviews code changes for exposed secrets, using patterns from over 150 industry partners and a fine-tuned AI model for nonstandard secrets. The scanning covers more than 500 secret types and flags issues in code changes or added lines before merges, but does not check repository history. The feature is opt-in and is off by default.

Why does it matter to an everyday developer?
This update enables developers and AI coding agents to catch exposed secrets—such as API keys and credentials—before code reaches the main branch. This reduces the risk of secret leaks and the associated security incidents. By integrating secret scanning directly into Copilot workflows, developers no longer need to maintain separate secret detection tools or rely solely on LLM-based patterns. It also enables teams to add checks to agents built with the Copilot SDK, creating safer automation.
What can the developer do now?
How to Enable and Use Secret Scanning in Copilot Tools
- 1
Enable secret scanning in your tool
For Copilot CLI, run /settings aiSecretDetection on in an interactive session. In the Copilot app, activate AI secret detection under Settings > Experimental. For SDK integrations, set the SECURITY_REVIEW_FINE_TUNED_MODEL feature flag to true. In Copilot code review, turn on Secret scanning under Security in repository settings.
