GitHub's ModernBERT secret scanner cuts post-push time by 86% and lowers false positives
GitHub deployed a new model that reduces median post-push scan execution time by 86 percent and improves detection quality for generic secrets.
Key points
- GitHub replaced its LLM-based pipeline with a fine-tuned ModernBERT classifier for secret detection.
- The new system reduces median post-push scan execution time by 86 percent compared to the previous method.
- Weighted acceptance of findings improved by 11.5 percent, indicating fewer false positives for developers.
GitHub has deployed a context-aware secret classifier that significantly reduces scan execution time and noise for organizations using its platform. According to research published by the GitHub Security Lab, the new model lowers median post-push scan execution time by 86 percent while improving detection quality for generic secrets that previously caused high false-positive rates.
How does the new detection system work?
GitHub’s secret scanning operates at two key moments: push protection prevents secrets from entering repositories by scanning changes before acceptance, and post-push scanning continuously checks committed code. The new scanner uses a two-stage pipeline. First, regex filters scan content for potential secrets with high recall. Second, a fine-tuned ModernBERT classifier evaluates each candidate alongside its file path, variable names, and surrounding code to distinguish real credentials from lookalikes like placeholders or documentation snippets.
What are the operational impacts for teams?
The efficiency of the ModernBERT classifier allows GitHub to extend generic secret detection to push protection, returning results before developers push changes rather than only after code is committed. According to the GitHub Blog, this approach raises weighted acceptance by 11.5 percent, meaning developers encounter fewer false positives. The model also delivers more than 98 percent cost savings compared to the previous LLM-based pipeline, making large-scale scanning more efficient for organizations.
Why is context critical for generic secrets?
Structured credentials often have distinctive prefixes or checksums, but generic secrets overlap with build identifiers, asset hashes, and sample values. GitHub notes that adding more rules to suppress these hard negatives risks hiding real secrets. The learned classifier uses context signals such as nearby code and text to determine if a string is a usable credential or a non-sensitive identifier, reducing the burden on security teams to investigate irrelevant alerts.
Questions to ask your suppliers
Security teams should inquire whether their code hosting providers use context-aware analysis for secret detection rather than simple pattern matching. Ask if the supplier scans code before it is committed to prevent accidental exposure. Determine who within your organization receives alerts and how they distinguish between false positives and genuine leaks. Verify that the supplier’s detection methods scale with AI-accelerated development without overwhelming developers with noise. Ensure your incident response plan accounts for secrets detected in push protection versus post-push scenarios.
What to do and how to stay safe: GitHub
- Review your organization’s secret scanning configuration to ensure push protection is enabled for all repositories.
- Train developers to recognize the difference between real credentials and documentation placeholders to reduce alert fatigue.
- Monitor scan execution times to ensure detection tools do not slow down development workflows significantly.
- Establish a clear process for investigating and remediating secrets detected in both pre-commit and post-commit stages.
Step-by-step guide: Browser Security Settings for Small Business Teams
General security guidance from the TechSec Feed newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What model does GitHub use for secret detection now?
GitHub uses a fine-tuned ModernBERT classifier as part of a two-stage pipeline that includes regex filters for candidate generation.
How much faster is the new scanner?
The new classifier reduces median post-push scan execution time by 86 percent compared to the previous LLM-based pipeline.
Does this improve detection accuracy?
Yes, the system raises weighted acceptance by 11.5 percent, indicating better distinction between real secrets and false positives.




