GitHub secret protection adds fast AI classifier to block more secrets

According to the GitHub Blog, GitHub introduced a new, low-latency AI classifier that can more than double the secrets blocked at push and will roll out to Cloud, Teams, and Server previews.

Brass padlock next to code printouts and a stopwatch on a wooden desk

According to the GitHub Blog, GitHub announced a new AI-powered classifier designed to extend push protection and catch more exposed credentials before they enter repository history. The post says the model, called ModernBERT, assesses candidate secrets in context in under two milliseconds and could more than double the number of secrets blocked at push.

Why this matters for web teams and site owners

GitHub reports that development activity is accelerating: currently one in three pull requests on GitHub involves an AI agent, up from fewer than one in 10 a year earlier. At the same time, a new secret appears in publicly visible code about once every two seconds, and that rate has doubled each year for the past three years. Those figures mean your teams and any automation they use are creating more code where credentials can accidentally appear. GitHub frames the problem this way: "Developers aren’t becoming more careless; they’re being outpaced." The practical result is that human-led cleanup can no longer keep up if detection and prevention remain unchanged.

GitHub secret protection: what changed

GitHub described several concrete changes in the post. The new ModernBERT classifier uses surrounding code context to evaluate candidate secrets without generating text, and it runs fast enough to be placed in the push path. GitHub says the classifier evaluates candidate batches in under two milliseconds and is cost efficient enough to run at scale. The company worked with Microsoft Applied Sciences on the fine-tuned model.

GitHub also reported operational numbers linked to its scanning and protection programs. In Q2 2026, public scanning reported an average of 26 credential matches per second. Push protection was blocking a secret at least once every second in the month before the post. When broader secret types are included, push protection stops about 30% of newly detected secrets before they enter history, leaving 70% to be discovered after exposure. GitHub adds that the mean time to manually revoke a secret is about 40 days, and roughly one in five exposures took more than 90 days to revoke.

The feature status and rollout details in the post are clear. ModernBERT was in private preview at the time of the announcement, and GitHub said it will be available later in the month to organizations with GitHub Secret Protection across Enterprise Cloud and GitHub Teams. It will consume AI credits. Organizations with AI secret detection will be automatically updated to the new model for post-push scans at no extra cost as part of their secret scanning purchase. The classifier will also appear in GitHub Enterprise Server 3.23 public preview and will be added to the /security-review command for the Copilot CLI and Copilot App. GitHub noted AI credit usage will be attributed to GitHub Secret Protection in AI usage insights.

Practical steps for small teams, nonprofits, and public sector projects

  • Turn on secret scanning and, where available, GitHub Secret Protection, so push protection can intercept obvious credentials before they enter history. Monitor any push-path blocks and follow established remediation steps.
  • Treat alerts as actionable: revoke or rotate exposed tokens promptly. The post notes manual revocation still averages about 40 days, so speed reduces risk.
  • Watch who can override push-path blocks and track override rates. The post reports the share of push-path blocks overridden fell from 6.63% to 3.93%, indicating developer behavior matters for trust in protection.
  • Track AI credit usage for secret protection if your organization enables the new classifier, as GitHub will attribute that usage to GitHub Secret Protection in AI usage insights.
  • Try the Copilot CLI or Copilot App security review commands if you use those tools, since the classifier will be added to those developer surfaces and can catch secrets before a push.

If you want hands-on help with deployment or secret scanning on platforms such as WordPress or Formidable Forms, consider contacting a specialist: Get help from a Formidable Masterminds developer.

Limits to expect and what to watch next

GitHub is upfront about trade-offs: there is a four-body problem they name, coupling precision, latency, throughput, and cost. A check that is too slow or expensive cannot run often enough in the push path; a false positive interrupts developers and reduces trust. GitHub also highlights that prevention scales with compute, but "remediation still scales with people." That means even with better push protection, many secrets will still be found post-push and need human action to revoke and replace.

Keep an eye on the rollout status for your organization type. The model was in private preview at announcement and scheduled to reach Enterprise Cloud, GitHub Teams, and Enterprise Server public preview according to the post. Also watch how partners in GitHub's secret scanning program respond; GitHub says many partners revoke tokens automatically when a public exposure is reported, which reduces time-to-revoke without waiting for a developer alert.

Bottom line

GitHub is adding a fast, context-aware classifier to extend push protection and catch more secrets before they enter repository history. That reduces the volume of post-exposure work, but it does not eliminate the need for rapid revocation, alert monitoring, and good credential hygiene. For most small teams and public sector projects, the immediate actions are straightforward: enable scanning and protection where available, treat alerts as high priority, and watch usage and override behavior as the new model rolls out. For teams needing help, the option to bring in an experienced developer is available via our contact page.

Sources

This post was drafted with AI from the reporting linked above and published by Jones Web Designs. For full details, read the original sources.

Found this useful? Pass it on to someone who would want to know.

All Web Development posts →

Cookie Notice

We use cookies to enhance your browsing experience and analyze site traffic. By clicking "Accept All", you consent to our use of cookies.