GitHub's secret scanning gets a purpose-built AI model
The model reads the code around a credential to catch passwords with no fixed token format, and now powers an opt-in push protection and Copilot security review.
GitHub published a changelog entry on 7 October describing a fine-tuned model built specifically for leaked secret detection. Instead of matching known token patterns, it reads the surrounding code to identify likely credentials, including passwords that have no recognisable format to pattern-match against.
AI-detected password alerts are already live for anyone on GitHub Secret Protection or GitHub Advanced Security, at no extra charge. Two newer uses are in private preview: the model can now power push protection, blocking a commit that contains one of these secrets, and GitHub Copilot’s /security-review command will fold secret detection into its findings. Both consume GitHub AI Credits once enabled. Push protection needs an admin to turn it on, and requires GitHub Enterprise Cloud or GitHub Teams with a GHSP or GHAS purchase. A public preview for GitHub Enterprise Server 3.23 is planned.
Why it matters: regex-based secret scanners miss a plain password because there’s no fixed shape to match for one. That’s a real gap, and it’s now closed for free for anyone already paying for Secret Protection or Advanced Security. If you want it to actually stop a push rather than just alert after the fact, you’ll need to opt into the preview and budget for AI Credits once it leaves preview.