Catch passwords and secrets that pattern scanners miss
An AI-based scanner flags unstructured secrets like passwords in config files that regex rules cannot match, for owners to rotate.
The use case
Secret scanners catch API keys with known formats, but not a database password typed into a YAML file. GitHub's secret scanning can use Copilot to detect generic secrets such as passwords in code and raise alerts alongside pattern-based ones. Security teams get alerts on repositories they could not cover with custom rules. Someone still reviews each alert, rotates the credential if it is real since removing it from history is not enough, and closes false positives with a reason. Assigning alerts to repository owners, with a target time to rotate, keeps them from piling up unread in a security dashboard.
Example workflow
- Enable secret scanning with AI detection on repositories
- Review new generic-secret alerts
- Confirm whether each is a real credential
- Rotate real credentials and remove them from code
- Close false positives with a note
Tools
- GitHub secret scanning
- GitHub Copilot
Risks and guardrails
- False positives are more common than with pattern rules
- Removing a secret from code does not revoke it; rotate it
- Push protection may not cover AI-detected types
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- GitHub Docs: security and quality AI features: docs.github.com/en/code-security/responsible-use/security-and-quality-ai-features