← all musings

The Best Patch Is Less Reachable Code

Every line of code you ship is a promise to defend it forever. AI just made breaking that promise cheap.

The most important security tool of the AI era isn’t a bug finder. It’s subtraction.

Yesterday Anthropic’s Frontier Red Team published early data on attack surface reduction. The idea is to use Claude to map the code a deployment can actually reach, then remove or restrict anything that deployment doesn’t need to expose. They ran Claude over 25 open-source projects written in a variety of languages, and it found 493 issues. That number will get the headline. The method is the real story.

For a year the AI-cyber conversation has been a race to find bugs. Anthropic’s own post says frontier models are “more than capable of discovering and exploiting security vulnerabilities.” The obvious defense is to point the same models at your own code and find the bugs first. Anthropic states the flaw in that plan directly: fixing vulnerabilities one at a time “scales poorly,” because “fixing even a critical vulnerability tells you nothing about the vulnerabilities that remain.” Bug hunting is a treadmill. Each patch settles one problem and tells you nothing about the rest.

Reachability works differently. A bug in code nobody can reach is a bug in name only. When you shrink what’s exposed, you lower the severity of bugs you haven’t found yet, “including the ones that might be under active exploitation.” Anthropic is clear about the limit. These techniques “don’t remove the unknown vulnerabilities in the code, but they do make the vulnerabilities harder to reach.” That’s the whole point. You get security without ever learning what you fixed. Most defenses decay as attackers adapt. This one compounds, because every path you close stays closed.

The best example is OpenSSH, of all projects. Claude found roughly 4,500 lines of new and experimental code for ML-DSA-44 reachable by an unauthenticated client in the default configuration. That’s about 16% of OpenSSH’s own pre-authentication code in a default sshd. Anthropic reported it to the OpenSSH developers along with patches, and the maintainers shipped the changes in version 10.6. If OpenSSH carries that much exposed experimental code, so does yours.

So why weren’t we already doing this? Because software only grows. Anthropic notes that code tends to pile up new layers of abstraction, new dependencies and new features over time. Adding is cheap and celebrated. Removing is expensive and thankless, because nobody can prove what depends on what. The engineer who ships a feature gets a launch post. The engineer who pulls an old subsystem gets paged if any of it mattered. Laziness didn’t produce the bloat. Incentives did. Organizations don’t fail at security because they lose the argument for it. They fail because nobody’s job is subtraction.

AI changes the cost of knowing what’s dead. It doesn’t change the incentive. Proving what’s dead has always been the expensive part. Anthropic says Claude can improve software security “meaningfully, and economically.” Once that knowledge gets cheap, the risk argument against acting on it gets much weaker. Apply a discount here: this is a preview of Anthropic’s own data on Anthropic’s own model, from the lab that also warns loudest about offensive capability. It is selling both the warning and the fix. The logic holds anyway.

The same lesson showed up one layer down the stack yesterday. Simon Willison flagged that the private keys of eight eMudhra intermediate CA certificates had been compromised. Those certificates chain to roots trusted by the Mozilla, Microsoft, Apple and Chrome root programs and by many downstream trust stores. Now any software that bundles a trust list has to update. Linux distros need new ca-certificates packages. Python got certifi 2026.10.19, pip 26.2.2 and uv 0.13.4. Ask yourself how many machines running those packages ever needed that chain. Default trust lists are the path of least resistance, so most systems trust far more authorities than they will ever talk to. That’s attack surface too. It sits in a config file instead of a codebase.

The strongest objection deserves a straight answer. A model that decides code is unreachable will sometimes be wrong, and wrong cuts cause outages. The “unused” feature is somebody’s critical path. Anthropic’s answer lives in the workflow, not in trusting the model’s judgment. Most fixes don’t delete anything. They move that code behind an appropriate gate: from pre-auth to post-auth, from on-by-default to opt-in. Claude’s skill “designs and implements a gate and ensures that this causes no change in the program’s default behavior,” running “the project’s own test suite (along with a black box regression suite) against the baseline.” And “any gate that would change a non-default configuration is set aside for a human to decide.” The code stays available to the customer who needs it and goes dark for the one who doesn’t. The changes go upstream as patches, and maintainers decide whether to accept them, as OpenSSH’s did. The failure modes aren’t symmetric either. A bad gate breaks loudly, against a test suite, where you can see it. A reachable bug nobody found breaks quietly, in production, on an attacker’s schedule. I’ll take loud every time.

Here are the stakes. Defenders have been losing because they’re playing a different game. Attackers need one path in, and defenders have to cover all of them. If frontier models make finding paths cheaper for attackers, the only defense that keeps pace is to have fewer paths. Patching is linear. Subtraction changes the denominator.

Every line of code you ship is a promise to defend it forever, and AI just made breaking that promise cheap.