Secret scanning on demand for developers and agents
Summary
Copilot's security review specialist now runs GitHub secret scanning, so developers and agents can catch secrets in code changes before they're merged.
Secret scanning should keep pace with the way you build software, whether you write code yourself or work with an AI agent. Copilot’s security review specialist now runs GitHub secret scanning, so developers and agents can catch secrets in code changes before they’re merged.
You can use the public preview in Copilot CLI and Copilot app sessions, through Copilot SDK integrations, and in Copilot code review.
What’s new
Copilot security review already looks for exposed secrets as part of its LLM-based review. Once you opt in, it also runs GitHub’s secret scanning detectors alongside that analysis.
- Provider patterns: Detect more than 500 secret types from GitHub’s growing catalog, built with 150+ industry partners through the secret scanning partner program.
- GitHub’s fine-tuned model for secret detection: Not every credential has a recognizable format. The model reads surrounding code to identify likely secrets, including passwords and credentials in connection strings.
The review checks your changes for secrets. It doesn’t search repository history.
Secret scanning in your workflow
- Review changes as you work. In Copilot CLI and the Copilot app, ask your coding agent to run the
security-reviewspecialist. Use its findings to make fixes and request another review, or run/security-reviewyourself on your changes or an agent’s work. - Build checks into your own agents. With the Copilot SDK, your agent can request a security review before returning its changes, without maintaining separate secret detectors.
- Catch secrets during pull request review. Copilot code review can flag secrets on added lines, including changes that weren’t checked during development, so authors and reviewers can address them before merge.
Enable secret scanning
Secret scanning is off by default. Until you opt in, security review uses its existing LLM-based detection only.
Enable secret scanning for your tool, then request a review:
| Tool | Enable secret scanning | Run a scan |
|---|---|---|
| Copilot CLI | In an interactive session, run /settings aiSecretDetection on. |
Delegate to security-review through the task tool (agent_type: "security-review"), or run /security-review manually. |
| Copilot app | In Settings > Experimental, turn on AI secret detection. | Delegate to security-review through task, or run /security-review manually. |
| Copilot SDK integrations | When you create a session, set the SECURITY_REVIEW_FINE_TUNED_MODEL feature flag to true. |
Delegate from the session agent, or call session.rpc.tasks.startAgent with agentType: "security-review". |
| Copilot code review | In the repository’s Settings > Copilot > Code review, turn on Secret scanning under Security. | Request a review from Copilot on the pull request, or set up automatic reviews. |
Availability and billing
In the tools listed above, if you can use Copilot security review or Copilot code review today, you can use secret scanning. No additional plan is required. Scans consume AI credits under the Secret Protection AI Credit SKU.
Learn more and share feedback
Learn more about secret scanning and supported secret scanning patterns.
For Copilot, see how to run a security review in the app or request a code review.
Share your feedback in the community discussion.