Skip to content

Security Not yet confirmed elsewhere1 publisher 2 min read Published

GitHub's ModernBERT classifier replaces an LLM in secret scanning at over 98% lower serving cost

GitHub says a fine-tuned ModernBERT classifier cut median post-push secret-scan time by 86% and model serving costs by over 98% against its LLM pipeline. The speed also let it extend generic secret detection to push protection.

The Watch · Security desk

How we use AI Send a correction

Illustration accompanying GitHub's ModernBERT classifier replaces an LLM in secret scanning at over 98% lower serving cost
Generated illustration
Faster, more precise than GitHub's LLM pipeline GitHub's own figures for its ModernBERT classifier pipeline against its previous LLM pipeline, as reported by Help Net Security.

Three figures from GitHub. Median post-push scan execution time cut by 86% compared with the previous LLM pipeline. Precision 13% higher in an offline evaluation of post-push scanning on the same public traffic. Repository owner-weighted alert acceptance up 11.5% in a customer A/B experiment.

Faster, more precise than GitHub's LLM pipeline
FigureValueNoteClaim
Cut in median post-push scan time vs LLM pipeline86%1
Higher precision than LLM pipeline, post-push13% higheroffline evaluation, same public traffic9
Increase in alert acceptance, customer A/B test11.5% increaseweighted by repository owner10

What happened

  • The pipeline starts with regexes that flag credential-shaped strings, then a fine-tuned ModernBERT model scores each one using file path, credential type, variable names and nearby code or text.
  • In an offline test of post-push scanning on the same public traffic, GitHub measured 13% higher precision and 19% higher recall than the LLM pipeline.
  • Training data came from product feedback, regex-flagged repository examples and synthetic cases for thin or difficult categories, with human validation and annotation.

Why it matters

  • capability Generic secrets that can resemble build identifiers or sample values can now be scored before a push is accepted, as well as after the push lands.
  • exposure Developers who push credential-shaped strings face a block whenever the classifier's score meets the threshold, so a false positive now stops work in the moment.
  • constraint The published accuracy figures cover post-push scanning only, and all of them are GitHub's own, so block precision at push protection has no public number.

Push protection checks changes before a push is accepted [4], so a model at that stage sits in the developer's path. We think that is why speed decided the design. Help Net Security's summary of GitHub's write-up says the classifier's speed is what let GitHub extend generic secret detection to that stage [3]. The speed comes from size: ModernBERT classifies short sections of code and text [18], and GitHub exported the model to ONNX with 8-bit quantization for faster inference [14].

An 86% cut leaves post-push scans at 14% of the old median time, about one-seventh [19]. A cut of more than 98% leaves serving cost under 2% of the LLM pipeline's, a factor of more than 50 [20]. Both figures are GitHub's, relayed by Help Net Security [1][2].

Generic secrets are the hard case. Structured credentials often have a recognizable prefix, length, character set or checksum, while generic ones can resemble build identifiers, asset hashes and sample values [7]. Batu Ozturkler and Shengyu Fu said, "Adding more rules can suppress some of them, but each exception risks hiding a real secret." [8]

The threshold decides what happens next. A candidate that meets it triggers an alert after a push or a block during push protection [6]. A false positive at push protection therefore interrupts a developer in the moment, where after a push it is an alert someone triages later. GitHub selected thresholds in offline evaluation and validated them on traffic resembling production before rollout [15].

The evidence has limits. The offline gains were measured for post-push scanning [9]. The write-up does not say whether they are relative or percentage points, and it includes no separate figures for push protection. GitHub grouped rows sharing a repository, candidate value or example before splitting the data, so near-duplicates stay out of both training and evaluation [13].

The customer experiment counts alert acceptance, weighted by repository owner so customers who resolve large batches at once do not dominate [11]. Acceptance shows which alerts customers act on. It cannot show secrets the scanner missed. The authors said, "Higher precision means fewer distracting alerts. Higher recall means more real secrets are caught," [17]

What to watch

  • Whether GitHub publishes precision, recall or block-rate figures for push protection, which the current figures do not cover.
  • GitHub's planned feedback loop: production misses and false positives going into training data, and any updated metrics that follow.
  • GitHub's work on a single-step architecture that combines secret detection and extraction, which would simplify the regex-then-classifier pipeline.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence55
Adoption50
Hype gap+10
Incentives60
Confidence60
Why these scores

Claim ledger

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

  1. [1]

    GitHub's new credential classifier pipeline cut median post-push scan execution time by 86% compared with its previous LLM pipeline.

    Reported Supported Source: GitHub, as reported by Help Net SecurityView cited source
  2. [2]

    The new pipeline cut model serving costs by more than 98% compared with the previous LLM pipeline.

    Reported Supported Source: GitHub, as reported by Help Net SecurityView cited source
  3. [3]

    The classifier's speed enabled GitHub to extend generic secret detection to push protection.

    Reported Supported Source: Help Net Security's account of GitHub's write-upView 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 14, 2026

    GitHub adopts cheaper AI model to catch secrets developers leave in code

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.

Topics

Loading related stories