The landscape of software development is undergoing a seismic shift, driven by the rapid proliferation of artificial intelligence. Today, one in three pull requests on GitHub involves an AI agent—a staggering increase from fewer than one in 10 just a year ago. If this current trajectory holds, the industry is on the cusp of a milestone where the majority of code pushed to GitHub will be generated by non-human agents. Much of this code, designed for speed and efficiency, may never be fully read or audited by a human developer.
This transition marks a pivotal moment for software security, particularly regarding the exposure of sensitive credentials. As developers and agents accelerate the pace of creation, the infrastructure protecting that code must evolve at an equal or greater velocity. The core challenge is no longer just about developer error; it is about keeping pace with an unprecedented volume of output. The tools that enable developers to build software faster must, by necessity, assume the burden of protecting that software as well.
The Myth of Developer Carelessness
A common narrative in the cybersecurity community suggests that the rise of AI coding assistants has made developers increasingly careless. However, data from the past nine quarters suggests that this premise is fundamentally flawed. In reality, developers are not becoming more reckless; they are being significantly outpaced by the sheer volume of code being produced.
Data covering the period from Q2 2024 to Q2 2026 reveals that while the volume of screened pushes on GitHub grew by a factor of 2.84, the number of pushes containing credentials grew by 2.59 times. Across these nine quarters of observation, there was no statistically significant trend indicating an increase in the prevalence of leaked secrets per push. Furthermore, evidence suggests that developers are more conscious of security risks than ever before. The share of "push-path blocks"—instances where GitHub’s security systems detect a potential leak and ask the developer to intervene—that were overridden by developers fell steadily from 6.63% to 3.93%. This downward trend indicates that developers are increasingly receptive to security guardrails and are less willing to ignore potential vulnerabilities.
The crisis is a matter of scale. At a fixed rate of error, doubling the volume of activity naturally doubles the number of expected exposures. If each exposure requires a manual human response to mitigate, the workload for security teams becomes unsustainable. Currently, the mean time to manually revoke a secret hovers around 40 days, with roughly one in five exposures taking more than 90 days to resolve. In an era where software creation happens in seconds, the fact that exposed credentials can remain active for weeks or months creates a dangerous window of vulnerability. Human remediation simply cannot scale at the same pace as automated development.
Prevention as a Scaling Solution
The strategy for modern security must shift from reactive remediation to proactive, automated prevention. Over the past few years, GitHub has focused on strengthening its secret scanning program, which now encompasses more than 150 technical partners. By collaborating with these issuers—ranging from cloud providers and API platforms to communication tools like Slack—GitHub can detect and report public exposures in near real-time.
In the second quarter of 2026, public scanning successfully reported an average of 26 credential matches per second. Once a match is confirmed, many partners can trigger an automatic revocation of the token. This bypasses the need for the developer to intervene, ensuring that even if a secret is accidentally pushed, it is rendered useless before it can be exploited.
"Push protection" acts as an even more critical layer of defense, intervening before the code ever enters the repository history. By stopping recognizable credentials at the point of origin, GitHub provides the developer—or the agent—a chance to correct the error immediately. Thanks to ongoing collaboration with technical partners, these detectors have reached a level of precision that allows them to be enabled by default. In the past month alone, push protection blocked a secret at least once every second. While these efforts are significant, they currently address roughly 30% of newly detected secrets. The remaining 70% are discovered only after the credential has already entered the repository, necessitating a more robust, intelligent approach to detection.

Solving the "Four-Body Problem" of Security
The challenge of protecting code is complicated by what security engineers describe as the "four-body problem": the delicate balance between precision, latency, throughput, and cost. Before a secret is pushed, the security check is a binary "allow or block" decision. Once that secret is committed, the cost of an exposure becomes potentially unbounded.
The difficulty lies in identifying secrets that do not follow standard patterns. While a provider-issued token—such as an OpenAI API key or a Google Cloud credential—often carries a recognizable prefix, internal database passwords or custom configuration keys are frequently unstructured, lacking any distinct signature. To detect these, the system must analyze the surrounding code and broader context.
However, performing this level of analysis creates friction. If a security check is too slow, it disrupts the developer’s workflow. If it produces too many false positives, it erodes trust in the system. If it is too computationally expensive, it cannot be run at scale. Balancing these four competing constraints is the primary hurdle in building an effective, automated gatekeeper for modern development environments.
Introducing ModernBERT: Protection at Scale
To address these challenges, GitHub has developed a new, fine-tuned classifier using ModernBERT, a model built in collaboration with Microsoft Applied Sciences. This AI-powered tool is designed to assess candidate secrets within their specific code context without needing to generate prose or perform resource-heavy code generation.
The model is exceptionally efficient, evaluating candidate batches in under two milliseconds. This speed is crucial for the "critical path" of software development, as it allows security checks to occur in real-time without causing noticeable delays for the developer. By leveraging this context-aware model, GitHub expects to more than double the number of secrets it can successfully prevent from being pushed.
The feature is currently in private preview and is slated to roll out later this month to organizations using GitHub Secret Protection across Enterprise Cloud and GitHub Teams. By utilizing AI credits to power these scans, GitHub is attempting to move toward a future where developers can delegate more tasks to autonomous agents without the constant need for human oversight.
As the industry moves toward a future defined by AI-driven development, the fundamental philosophy of security must change. The goal is to create an ecosystem where the capacity to protect software grows in lockstep with the capacity to create it. By shifting the burden of security from the human to the platform, GitHub aims to ensure that the rapid advancement of coding agents does not come at the cost of the integrity and safety of the global software supply chain. The path forward involves not just better tools, but a systemic integration of security into the very fabric of the development lifecycle, ensuring that as code volume scales, the protection of that code scales with it.

