Cloudflare's AI bug-hunting harness cuts 13,841 findings to 7,245
In short
- Cloudflare published an engineering post on 18 June 2026 describing the "harness" it built to hunt for security bugs with AI models across its code. A harness is the surrounding software that hands tasks to models, stores their results and checks them, so that no single chat session has to remember everything.
- It started as one prompt file of about 450 lines run on a single repository, and in about six weeks became a scanner covering 128 repositories. One model hunts; a different model judges what the hunt found.
- Cloudflare says its shared findings system held 13,841 findings across 145 repositories, that a deduplication agent folded away 5,442 as duplicates, and that 7,245 were left as actionable. All counts are the company's own and have not been independently checked.
~450 lines the first audit prompt ("skill"), run on one repository; 128 repositories the discovery harness covers after about six weeks; 13,841 findings in the shared validation system, across 145 repos; 5,442 folded away as duplicates; 7,245 actionable findings left for engineering teams
What is a vulnerability harness?
Pointing an AI coding agent at a codebase and asking it to find security bugs works for a while. Cloudflare says it then hits limits: the agent holds one idea at a time, fills its context window (the amount of text a model can keep in view) and loses what it learned when that window is trimmed. A harness moves the memory out of the model. Each stage writes to a database, and the model is treated as a stateless worker that can be swapped.
Cloudflare's post names three walls it ran into with the single prompt:
- Context exhaustion. An hour in, the model forgets the bugs it found earlier. Fix: keep all state outside the model.
- Persistence. A crash or rate-limit error mid-run means starting over. Cloudflare's stages write to one SQLite database, so a crash costs the task in flight and nothing else.
- Cross-repo reasoning. A session on one repository cannot see the programs that use it, and Cloudflare says bugs at the interfaces between components are probably more numerous than one might expect.
Cloudflare also reports that a single run of the original skill finds only about half the bugs found across several runs, and that those skew toward the simpler ones.
How the pipeline works
The original skill ran a seven-phase audit in one session: research agents map the code, "Hunter" agents try to break it class by class, validators try to disprove each finding, and a fresh agent re-checks the survivors. Cloudflare says it lifted each phase into its own agent, put a database behind them and an orchestrator in front, and that the mapping was "almost one-to-one".
The result has two systems.
Some details that stand out:
- Two different models. One model runs VDH and a different one runs VVS, so the second checks the first's work with, in Cloudflare's words, a different set of logic. It also says treating providers as interchangeable lets the harness absorb changes in model behaviour over time.
- Recon writes the threat model. Beyond about ten built-in attack classes, the Recon agent can invent classes specific to a repository.
- Hunters run code. They compile fragments and attack them in a sandbox built on unshare; Cloudflare calls giving Hunters a sandbox the biggest jump in quality.
- Proof or nothing. Every confirmed finding must ship a proof-of-concept written as a test that runs against the untouched codebase, plus a proposed patch. With no working proof, the finding is treated as fake. A Hunter must also state who the attacker is and what boundary is crossed before it may file anything.
- The validator cannot file findings. Plain code first checks that the cited files exist and that the patch and test parse; then one isolated agent tries to disprove the finding. Cloudflare says a Hunter that grades its own work "will confidently validate everything it outputs".
- Tracing across repositories. A Tracer agent checks whether attacker input can reach a vulnerable component from outside and, if so, creates hunt tasks in the repositories that consume it.
- A wishlist. When an agent lacks a tool, such as a FreeBSD virtual machine to confirm an exploit, it writes a request to a central list. It was written to 25,472 times across 128 repositories, and Cloudflare calls it the most-used tool in the system. By contrast, the Semgrep static-analysis tool was invoked zero times in a month of runs.
What is deduplication, and why does it need its own agents?
Deduplication means recognising that two reports describe the same underlying bug, so that one fix closes both. Comparing every finding with every other using a model grows with the square of the number of findings, so Cloudflare has plain code build indexes over files, functions, trust boundaries and rare tokens and produce a short candidate list for each finding. Only then does a model judge whether one fix would close several. Stable keys make a bug found again reopen its old record rather than create a new one.
What is a false positive, and how are they cut?
A false positive is a reported bug that is not real, or not a risk. Cloudflare's filters are layered: the threat-model requirement, the test-against-original-code rule, the disproving validator, then the VVS "Judgment" agent. Judgment checks company wikis, tickets, code and configuration to decide whether a bug is reachable in production, separating "exploitable now" from "real but latent" and "real but filed against the wrong component". It also confirms the bug still exists on the latest main branch.
Cloudflare says its validation rejection rate fell from 40% to 11% after Recon supplied better context, while the share of high-integrity findings rose from 35% to 58%.
The funnel in numbers
Cloudflare says that at the time of writing the discovery harness had emitted 20,799 raw candidates, of which about 12,057 survived validation. Adding findings from another harness brought the shared pool to 13,841.
The step counts add up: 13,841 minus 5,442 minus 1,154 is 7,245 (our check). The post does not say how many of the 7,245 were judged exploitable from the internet; its chart lists that category, but the text gives no figure.
For a "standard" repository of about 30,000 lines, Cloudflare's illustrative benchmark is roughly 100 initial findings, compressed to 80 distinct bugs, with automated fixes taking about 5 minutes per bug. It says about 10 of those 80, the critical, high and exploitable ones, go through human review and reach production in 5 days, with the rest rolled out over 15 to 20 days. This is a modelled example, not a measured result.
What it costs and what it does not claim
Almost all the compute goes into the hunt stage. Cloudflare budgets per repository with a task cap, runs 50 to 200 workers, and says the worst full run took just over 14 hours. Because of that, the big scans are periodic sweeps rather than a check on every code change.
The post is open about limits:
Cloudflare does not claim a false-negative rate, because there is no labelled list of every real bug in a codebase. Its measure is whether re-runs keep finding new bugs and whether coverage keeps growing. The Fixer, which writes patches and runs the tests before and after, is "the youngest and slowest part", and it never merges code on its own: a human reviews every branch.
What the post does not give: how many of the 7,245 findings were confirmed real by humans or have been fixed, which models it uses, or what it cost in money. It says the findings come from an isolated research experiment and "do not represent active, unpatched vulnerabilities" in production, and that the numbers were out of date by publication.
What is new
The post follows Cloudflare's earlier Project Glasswing findings write-up, which looked at pointing frontier security models at an enterprise codebase. Cloudflare says most AI security write-ups cover one repository or a benchmark, and that fleet-wide cross-repo tracing is not something it has seen written up elsewhere. It released the initial audit skill, lightly cleaned up, at github.com/cloudflare/security-audit-skill; the harness itself it says may "follow shortly". We did not open the repository.
Its advice for anyone copying this: begin with a skill in your own development environment, then add a database with Recon, Hunt and Validate stages and a separate validator that cannot file findings. Skip cross-repo tracing until more than one repository matters, and skip a dedup agent until noise becomes a problem.
Sources
- Build your own vulnerability harness, Cloudflare blog, 18 June 2026
Sources
Related stories
- Cloudflare brings full post-quantum switch forward to 2027
- Cerebras and NVIDIA plan to split AI answers across two chips
- NVIDIA announces Nemotron 4, a family of open AI models
- Cloudflare releases five open-weight models built on Qwen
- Anthropic says it moved Claude's API from Python to Rust
- Sarvam AI releases Sarvam-105B-1711, an updated open 105B model