The detector reads context now.
GitHub announced a purpose-built model that reads surrounding code to find likely credentials, including passwords without a recognizable token format. The company says existing AI-detected password alerts have moved to the new model. AI checks for push protection are in private preview, and checks inside Copilot's /security-review command are planned for private preview.[1]
This fills a real gap. A regular expression can match a known token shape. A password in a configuration assignment may have no stable prefix, length, or alphabet. Context gives the detector another signal.
A finding can stop a bad push. It cannot rotate the credential that already escaped.
Three surfaces, three contracts.
Repository alert scanning, push protection, and a local security review run at different times. An alert can arrive after content enters repository history. Push protection can interrupt the write before that happens. A security review can inspect active changes before commit or push.[1]
Do not reduce these surfaces to one green shield. Record where the check runs, what it can block, who can bypass it, and who receives the finding. The new push and security-review checks are opt-in. Running /security-review alone will not enable the new classifier.[1]
The cost switch is part of security.
GitHub says AI-detected alerts remain included with Secret Protection. The planned push-protection and security-review checks will consume AI Credits after customers opt into the preview and enable them. GitHub also says a push check can consume credits even when it does not block the push.[1]
A budget alert is not a hard stop. GitHub tells administrators to configure "Stop usage when budget limit is reached" when they need a spending cap.[1] That setting belongs beside the enable switch. An agent must not change either without explicit authority.
Rotation closes the incident.
GitHub's secret-scanning guide says a committed credential should be treated as compromised. The response can include validity review, token deletion and replacement, service updates, and a check for unauthorized activity.[3]
Removing the string from the branch is not the same as revoking it. GitHub also notes that removing a token does not automatically close the alert. The alert needs a separate resolution step.[3] Keep detection, code cleanup, rotation, and alert closure as distinct receipt fields.