GitHub adds secret detection in code before merge to Copilot security review
GitHub has launched, in public preview, secret scanning within Copilot security review – checking changes for secrets before merge, available in Copilot CLI, app, SDK, and code review. The feature is opt-in and consumes AI credits.
GitHub has extended the Copilot security review specialist with the ability to run GitHub secret scanning, so that developers and AI agents can detect leaked secrets in code before merge. The feature is available as a public preview in Copilot CLI, Copilot app sessions, via Copilot SDK integrations, and in Copilot code review.
According to GitHub, Copilot security review already searched for exposed secrets as part of its LLM-based analysis. After enabling this new feature, GitHub secret scanning detectors now also run alongside it. The check only applies to the changes made, not to the entire repository history.
Secret scanning is off by default and requires opt-in – in Copilot CLI via the command /settings aiSecretDetection on, in the Copilot app under Settings > Experimental, in SDK integrations by setting the feature flag SECURITY_REVIEW_FINE_TUNED_MODEL, and in Copilot code review under the repository's Settings > Security.
The feature can be used without an additional plan in any tool where Copilot security review or Copilot code review is available. Scanning consumes AI credits within the Secret Protection AI Credit SKU.
Why it matters
Leaks of API keys and other secrets into code are among the common security incidents, and detecting them only after merge or deployment is more costly than catching them before changes are integrated. Integrating secret scanning detectors directly into the code review workflow and agentic tools makes it possible to catch secrets earlier, but so far only within changes, not within the repository history, and it requires manual enabling and additional AI credits.
Two audiences, two different impacts
What this means
For individuals
Developers and agents working with Copilot CLI, Copilot app, SDK integrations, or Copilot code review can now enable additional checks for secrets in code beyond the existing LLM-based analysis, before a pull request is merged.
For a business
Companies using GitHub Copilot can now detect leaked secrets (API keys, tokens) in code before merge directly within the code review process, which reduces the risk of sensitive data leaking into production or public repositories. The feature is opt-in and consumes additional AI credits, so enabling it brings an extra cost compared to the existing LLM-based review.
Risks and complianceCheck the original
Event sources
clearly official source · 1 publisher, 0 independent. We count feeds from the same owner only once.