Skip to content

Security Not yet confirmed elsewhere1 publisher 2 min read Published

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

How we use AI Send a correction

Illustration accompanying GitHub's push protection gets an AI classifier for passwords that pattern matching misses
Generated illustration

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
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    GitHub announced an AI detector, developed with Microsoft Applied Sciences, to help prevent developers from uploading passwords and other credentials to code repositories.

    Reported Supported Source: Help Net Security, reporting GitHub's announcementView cited source
  2. [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.

    Reported Supported Source: Help Net SecurityView cited source
  3. [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.

    Reported Supported Source: Help Net SecurityView cited source

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.

Add to ChatGPTAdd to Claude

Sources

1 independent publisher whose own reporting we read for this story.

  1. helpnetsecurity.com

    1 article · October 8, 2026

    GitHub adds AI to catch passwords before a code push

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Entities

Loading related stories