GitHub's push protection gets an AI classifier for passwords that pattern matching misses
GitHub says adding an AI classifier to push protection could more than double the secrets it can stop, by spotting passwords that have no fixed format. Push protection now stops about 30% of newly detected secrets before they reach repository history.
The Watch · Security desk

What happened
- Format-based checks recognize many credentials by pattern, while the new ModernBERT model reads the surrounding code to flag secrets such as database passwords that follow no pattern.
- Revoking an exposed secret by hand takes around 40 days on average, and roughly one in five exposed secrets takes more than 90 days.
- The expanded push protection is in private preview and is due later in October for Secret Protection customers on Enterprise Cloud and Team plans.
- The model ships in public preview with GitHub Enterprise Server 3.23, giving AI-detected alerts to Secret Protection customers, including air-gapped installations.
Why it matters
- decision Teams have to measure how often the classifier blocks clean code in their own repositories before relying on its blocks.
- constraint Customers have no public baseline for unstructured leaks, so the more-than-double figure can only be checked against their own repositories after rollout.
- cost Prevention is the metered option: organizations that ration AI credits keep the included post-push alerts, and with them the cleanup after a secret is already exposed.
Push protection acts at one point. It can block a push before a credential enters repository history [2]. Everything it misses is detected after exposure [10]. By then the credential can give someone access to a database, a cloud service or another connected system, and the owner has to replace it and check whether it was misused [11]. Some service providers revoke credentials automatically when GitHub reports an exposure [13].
The model, built with Microsoft Applied Sciences [1], is aimed at credentials with no fixed format. A database password with no recognizable pattern gets past format checks [3]. GitHub's push statistics have the same limit: they cover supported provider patterns, including GitHub's own tokens [9]. Unstructured passwords sit outside those figures by definition [3][9].
Leak counts are tracking code volume [7][8]. GitHub says a new secret appears in publicly visible code roughly every two seconds [6]. At that rate, about 43,200 appear each day [20]. From the second quarter of 2024 to the second quarter of 2026, the public pushes GitHub screened rose 2.84-fold and pushes containing credentials rose 2.59-fold [7]. Over those nine quarters GitHub found no statistically detectable trend in the share of pushes carrying secrets [8].
"Push protection intervenes earlier. It stops recognizable credentials before they enter repository history, giving the developer or agent a chance to correct the change before there's an exposure to investigate," Erin Havens, a product manager at GitHub, wrote [4]. Her statement counts agents as well as people among those pushing code [4]. The word "recognizable" describes the coverage push protection already had. The classifier is meant to extend the block to credentials a pattern cannot recognize [3].
Latency looks handled. GitHub says the model evaluates batches of candidate secrets in under two milliseconds [21]. Accuracy is harder. GitHub says false alarms can interrupt developers and undermine trust in future warnings, and that detection has to balance accuracy, speed, processing capacity and operating costs [5]. The announcement does not include a false-positive rate, and the claim that the classifier could more than double the secrets push protection prevents is GitHub's own projection [22].
Blocking at push consumes AI credits [15]. Alerts from scans after a push remain included in the secret scanning purchase at no additional cost [17]. GitHub has begun moving organizations already using AI secret detection to the new model automatically [16]. It is also adding the classifier to the /security-review command in Copilot CLI and Copilot App, letting Copilot users check for secrets before pushing without their organization holding a Secret Protection plan [19]. That credit use is attributed to GitHub Secret Protection in AI usage insights [19].
What to watch
- Any false-positive or precision figures GitHub publishes from the private preview, or customer reports of clean pushes being blocked.
- Whether the later-October release to Enterprise Cloud and Team organizations lands on schedule, and what AI credit consumption per push looks like in AI usage insights.
- Whether GitHub extends its published leak trend data to the unstructured secrets the classifier detects.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence42
- Adoption30
- Hype gap+25
- Incentives62
- Confidence48
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
GitHub announced an AI detector, developed with Microsoft Applied Sciences, to help prevent developers from uploading passwords and other credentials to code repositories.
- [2]
GitHub's push protection checks code for secrets and can block a push before a credential enters repository history; the new classifier will expand it.
- [3]
Existing checks recognize many credentials by their formats. The new ModernBERT-based classifier examines surrounding code to identify unstructured secrets, such as database passwords with no recognizable pattern.
- [4]
"Push protection intervenes earlier. It stops recognizable credentials before they enter repository history, giving the developer or agent a chance to correct the change before there's an exposure to investigate," Erin Havens, Product Manager at GitHub, wrote.
- [5]
False alarms can interrupt developers and undermine trust in future warnings. GitHub must account for accuracy, speed, processing capacity and operating costs when detecting secrets.
- [6]
GitHub says a new secret appears in publicly visible code roughly every two seconds.
- [7]
From Q2 2024 to Q2 2026, the number of public code pushes GitHub screened increased by a factor of 2.84; pushes containing credentials increased by a factor of 2.59.
- [8]
Over those nine quarters, GitHub found no statistically detectable trend in the share of pushes containing secrets.
- [9]
GitHub's public push data covers supported provider patterns, including GitHub's own tokens.
- [10]
Across the broader range of secret types GitHub detects, push protection blocks about 30% of newly detected secrets before they enter repository history; the remaining 70% are detected after exposure.
- [11]
An exposed credential can give someone access to a database, cloud service or other connected system; developers may then need to disable it, replace it and investigate whether it was misused.
- [12]
Manual revocation of exposed secrets takes around 40 days on average, with roughly one in five exposed secrets taking more than 90 days.
- [13]
Some service providers revoke credentials automatically when GitHub reports an exposure.
- [14]
The expanded push protection is in private preview; GitHub plans to make it available later in October to organizations with GitHub Secret Protection on Enterprise Cloud and GitHub Team plans.
- [15]
The expanded push protection feature will consume AI credits.
- [16]
GitHub began automatically updating organizations already using AI secret detection to the new model.
- [17]
Alerts from scans performed after a push remain included in the secret scanning purchase at no additional cost.
- [18]
The model will ship in public preview with GitHub Enterprise Server 3.23, providing AI-detected alerts to Secret Protection customers, including those running air-gapped environments.
- [19]
GitHub is adding the classifier to the /security-review command in Copilot CLI and Copilot App, letting Copilot users check for secrets before pushing without an organization's GitHub Secret Protection plan; AI credit usage will be attributed to GitHub Secret Protection in AI usage insights.
- [20]
At one new secret roughly every two seconds, about 43,200 new secrets appear in publicly visible code per day.
- [21]
GitHub says the classifier evaluates batches of possible secrets in under two milliseconds.
- [22]
GitHub says the classifier could more than double the number of secrets that push protection can prevent.
Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.
Sources
1 independent publisher whose own reporting we read for this story.
- helpnetsecurity.comGitHub adds AI to catch passwords before a code push
1 article · October 8, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- AI For CybersecurityFollow
- Software Supply Chain SecurityFollow
- Secret ScanningFollow