GitHub has introduced an AI-powered credential classifier developed alongside Microsoft Applied Sciences to enhance its repository push protection capabilities. Built on the ModernBERT model, the detector evaluates candidate secrets in under two milliseconds to help developers intercept unstructured credentials, such as database passwords without standardized text formats, before code enters repository history.
Contextual Analysis for Unpatterned Credentials
Traditional push protection mechanisms rely primarily on predefined format patterns to catch API keys and tokens before a commit completes. The ModernBERT classifier expands this detection by analyzing surrounding code context, enabling it to flag unstructured secrets that lack recognizable syntax. GitHub estimates that this contextual model could more than double the volume of secrets prevented from entering code repositories.
Addressing Exposure Scale and Remediation Delays
The expanded capability arrives amid a growing volume of committed code. According to GitHub, a new secret appears in public code roughly every two seconds. Between Q2 2024 and Q2 2026, public code pushes screened by GitHub increased by a factor of 2.84, while pushes containing exposed credentials grew by 2.59, maintaining a steady exposure rate over nine quarters.
Currently, GitHub push protection blocks about 30 percent of newly detected secrets prior to commit, leaving the remaining 70 percent to be discovered post-push. Manually revoking exposed credentials takes an average of 40 days, with approximately one in five exposed secrets requiring more than 90 days to remediate, though select cloud service providers support automated revocation upon exposure notification.
Deployment and Copilot Integration
The classifier is currently in private preview, with broader availability planned for late October 2026 for organizations on GitHub Team and GitHub Enterprise Cloud plans equipped with GitHub Secret Protection. Organizations already using AI secret detection will be upgraded to the new model automatically, while post-push scan alerts remain included in existing secret scanning tiers.
For self-hosted deployments, the model will launch in public preview alongside GitHub Enterprise Server version 3.23, bringing AI-detected secret warnings to air-gapped environments. GitHub is also integrating the classifier into the /security-review command across Copilot CLI and the Copilot App, allowing individual Copilot users to run pre-push checks without requiring an enterprise-wide secret protection subscription.
AI-generated editorial illustration; not a documentary photograph.
Source: GitHub adds AI to catch passwords before a code push

Leave a Reply