GitHub described credential detection combining regex and the ModernBERT model
GitHub deployed a scanner that uses regex to find possible credentials and the ModernBERT model to assess them in context. According to the company, the median scanning time after changes were pushed fell by 86 %, making it possible to extend detection to push protection.
GitHub described a deployed credential detection scanner that combines regex rules with a fine-tuned ModernBERT model. According to the company, the median scanning time after changes were pushed fell by 86 % compared with the previous LLM-based approach. The company says this speedup made it possible to extend generic credential detection to push protection, which checks changes before they are pushed.
Regex rules first find strings that resemble credentials. The ModernBERT model then assesses their value, file path, credential type, variable names, and surrounding code or text. Based on the resulting score, the scanner generates alerts or filters out likely harmless values, such as example credentials, checksums, and values in tests.
During training, the company emphasized examples of both real credentials and similar harmless strings. Before splitting the data, it grouped related examples to prevent nearly identical records from appearing in both training and evaluation. It selected decision thresholds during offline evaluation and then verified the behavior on traffic resembling a production environment.
Why it matters
The approach described provides concrete guidance for designing sensitive data detection: rules quickly find candidates, while a classifier handles cases where the surrounding context is decisive. Internal measurements by GitHub also show how shortening a scan can make it possible to run it before changes are pushed.
Two audiences, two different impacts
What this means
For individuals
Extending detection to push protection allows developers to address a suspected credential before pushing changes to the repository.
For a business
For businesses, the approach targets both the risk of credential leaks and the work involved in handling false alerts. According to GitHub, the classifier is intended to filter out harmless strings before they reach developers.
Risks and complianceCheck the original
Event sources
only one source so far · 1 publisher, 0 independent. We count feeds from the same owner only once.