GitHub Copilot Code Review: Secret Detection Flags Exposed Credentials in Pull Requests
Copilot code review now flags exposed credentials in review comments so they can be removed before merging, in public preview. It combines deterministic detection of 500+ secret types from 150+ partners with an LLM and a purpose-built secret model for secrets without recognizable patterns. It is enabled under repository or organization Copilot, Code review settings.
Key Takeaways
- Secrets are flagged in review comments, so they can be removed before the pull request merges.
- Known formats use deterministic detection across 500+ secret types from 150+ partners.
- Unrecognized formats use LLMs and GitHub's purpose-built secret model.
- Enabling it takes one setting under Copilot, Code review in repository or organization settings.
- It catches secrets earlier than post-push scanning, at the point of review.
- It is a public preview on Pro, Pro+, Max, Business and Enterprise plans.
Catching Secrets During Review
Copilot code review can now flag exposed credentials directly in review comments, in public preview. Developers see the finding on the pull request and can remove the secret before it merges.
Two Detection Methods
For known formats, Copilot uses deterministic methods such as regex across more than 500 secret types from over 150 technical partners in GitHub's secret scanning partnership program. For formats with no recognizable pattern, Copilot uses LLMs and GitHub's purpose-built secret model to find secrets that rules would miss.
Turning It On
Go to repository or organization settings, select Copilot, then Code review, and enable secret detection. It is available on Copilot Pro, Pro+, Max, Business and Enterprise plans. Public preview features may change.