AI vulnerability scanning now runs as a pipeline. The pipeline maps the code and sends hunter agents to the risky parts. A different agent tries to disprove every candidate. People get the confirmed findings. Vercel and Cloudflare both run this pattern in production and both have released it as open source. Other companies use AI agents in security operations too, as we describe in AI security agents in the enterprise. Vercel released deepsec on May 4, 2026. Cloudflare released security-audit-skill on June 18, 2026.
An AI factory uses the same idea. It is a shared agent system for one type of task, run and checked by a small team. A security engineer does not review each file by hand. The security team runs the pipeline, reads its output, and improves its prompts and matchers.
Why one AI security review is not enough
One AI security scan misses most bugs. Cloudflare found that a single run catches about half of what repeated runs find. On Vercel's benchmark, the best model found 30.7% of the known vulnerabilities. So teams run the scan several times, cover every unit of code, and check each claim with a second agent. A single AI review has three limits:
- Cloudflare reports that "a single run found roughly half of the vulnerabilities that repeated runs found in total" (security-audit-skill README). Model output varies from run to run, even at temperature 0 (see LLM nondeterminism).
- On Vercel's DeepsecBench, the best model run found 30.7% of 231 human-judged findings. Of the 25 runs, 20 found less than 20%.
- Hunter agents make claims that are wrong. Cloudflare's validator rejected 40% of candidates in early runs.
A pipeline has a control for each limit. It runs many times and merges the results. It splits the code into units so the hunters cover all of it. It checks every claim with a second agent before a person sees it.
How AI vulnerability hunting differs from SAST
Static application security testing (SAST) tools, such as Semgrep and CodeQL, match code against fixed rules. AI hunters read the code, follow data across files, and run the code to test a claim. Cloudflare sets a high bar for each finding in its harness:
- The hunter must state the threat model: who the attacker is and which assumption the code breaks.
- Every confirmed finding ships with a proof-of-concept test that runs against the original, unmodified code. A finding without a working test is treated as fake.
- Every confirmed finding also ships with a proposed patch.
- Deterministic code checks that the cited files and functions exist and that the patch and the test parse.
The hunters had Semgrep available and "invoked it zero times in a month of runs." deepsec keeps a rule-based step at the start. Its regex scan selects candidate files at no cost, and the agents spend money only on those files.
How Vercel deepsec works
deepsec is "an agent-powered vulnerability scanner that you can run in your own infrastructure" (README). It is licensed under Apache 2.0. The command npx deepsec init installs it and sets up a project. Malte Ubl wrote the launch post.
The architecture document describes six stages:
- init. A read-only agent writes
INFO.md(a short description of the project) and a structured inventory of its security-sensitive surfaces. Then the tool generates regex matchers for that project. The model returns the matchers as strict JSON data. deepsec compiles that data and never runs code that the model wrote. Setup makes at most two attempts to reach the coverage target, and it does not start paid processing while coverage is below the target. - scan. Regex matchers run on every file. This stage uses no AI and costs nothing. It takes about 15 seconds for 2,000 files.
- process. Coding agents investigate the candidate files in batches. Each batch gets the system prompt and
INFO.md. The default backend is OpenAI Codex. Claude (through the Claude Agent SDK) and pi are the other backends. The tool runs the models at their highest reasoning setting by default. - revalidate. A second agent run reads the code again. It checks the git history to see if the issue is already fixed. It gives each finding one verdict: true positive, false positive, fixed, or uncertain. Vercel says this step "empirically reduces FP rate by 50%+ on most repos" (FP is false positive). An optional triage step sorts findings into P0, P1, and P2 with a cheaper model.
- enrich. The tool adds the committers from git and, through a plugin, the owners of each file.
- export. The tool writes the findings as JSON or as a folder of markdown files. Each finding is written as instructions that a person or a coding agent can act on.
deepsec has six more features for an enterprise rollout:
- Custom matchers. The most common change that Vercel makes to deepsec is a custom regex scanner. After an early scan found subtle edge cases in authentication checks, Vercel wrote a scanner "that covers every authentication path in our code."
- Diff mode.
process --diffscans and investigates only the files changed in a diff, so the same tool can review pull requests. - State on disk. deepsec keeps one JSON record per source file and appends new results to it. An interrupted run continues from its last checkpoint.
- Cost limits. Flags cap the spend and the run time, for example $100 and 2 hours.
- Refusals. After each research step, a classifier checks whether the model refused the task.
- Scale. Scans of Vercel's own code "routinely scale up to 1,000+ concurrent sandboxes."
After revalidation, the false positive rate is "roughly 10-20%." Scans of large codebases "can cost thousands or even tens-of-thousands of dollars," and a large repository can take several days on one machine. deepsec works best on applications and services. Libraries and frameworks need custom prompts and scanners.
How Cloudflare's security-audit-skill works
Cloudflare's skill is a set of instructions for a coding agent. It runs in any agent that supports tool use and parallel sub-agents. It installs with the Skills CLI (npx skills add). It has two modes. Guidance mode answers security questions. Full audit mode runs six phases in order:
- Reconnaissance. Four research agents run in parallel. They map the product and stack, the principals and their authority, the entry points and sinks, and how the code runs and is deployed. The parent agent writes a short
architecture.mdof about 1,000 words and a coverage ledger that lists every unit of code to hunt. - Coverage-led hunting. Each hunter agent gets units from the ledger, plus the architecture summary, the attack classes that apply, and a list of root causes already confirmed. After each wave, a new critic agent checks the ledger for missed units. In the standard and deep profiles (see below), a final critic must also find no remaining work.
- Candidate validation. Every candidate goes to "a fresh general verifier that did not hunt it." The verifier's prompt says: "You did not write this candidate. Try to refute it from repository source and bounded local evidence."
- Structured output. The parent writes
findings.json. Validator scripts check it against a JSON schema. - Independent record verification. A new verifier checks each confirmed record again. Any change to the verdict, root cause, impact, or severity needs another independent verifier.
- Reports. The skill writes a summary report, a detail report, and a list of open questions.
Each finding gets one of three verdicts:
| Verdict | Rule |
|---|---|
| Confirmed | Complete source trace and a bounded, observed result. Severity is set from the proven impact. |
| Needs validation | One exact fact is still open. No severity. |
| Rejected | Disproved. The record stays so that the same claim is not reported again without new evidence. |
The skill also states what is not a vulnerability. "Defense-in-depth gaps are not vulnerabilities." A deviation from a checklist is not a vulnerability. An action that a user is allowed to take against their own data does not cross a boundary. Severity can never be higher than the impact the agent showed.
The skill runs target code only inside an operating-system sandbox (we compare sandbox options in where agent code runs). The sandbox has no network and an empty environment, and the code can write only to a scratch folder. Without that sandbox, a finding stays at "needs validation." The audit describes fixes. It does not change the target's source.
Three profiles set the depth. Quick runs one hunter wave and one final critic. Standard is the default. Deep repeats critic waves until a pass finds nothing new, and gives covered units a second, independent pass.
Cloudflare's internal harness at scale
Cloudflare's internal harness turned 20,799 raw candidates into 7,245 actionable findings. The open skill is a cleaned-up version of the skill that Cloudflare started with. Cloudflare's harness post by Grant Bourzikas describes the internal system built on it. It has two stages: a Vulnerability Discovery Harness (VDH) and a Vulnerability Validation System (VVS). "We use one model for VDH, but we use a completely different model for VVS."
The post reports these numbers:
| Measure | Value |
|---|---|
| Repositories in the discovery harness | 128 |
| Repositories in the validation system | 145 |
| Raw candidates from discovery (128 repositories) | 20,799 |
| Survived validation (128 repositories) | About 12,057 |
| Findings in the central validation pool (145 repositories) | 13,841 |
| Actionable after deduplication and triage | 7,245 |
| Longest full scan | Just over 14 hours |
| Parallel workers | 50 to 200 |
| Hunter context use | Below 25% of the window |
Validation quality improved as Cloudflare tuned the hunters. The share of candidates that the validator rejected fell from 40% to 11%. The share of candidates that survived validation (Cloudflare calls these high-integrity findings) rose from 35% to 58%.
A Fixer agent writes a patch for each confirmed finding. "The Fixer never merges code on its own; a human must review the branch." On a repository of about 30,000 lines, a full discovery run takes 3 to 4 hours and produces about 100 raw findings. After deduplication, 80 remain. The Fixer takes about 5 minutes per bug. The pipeline opens pull requests in about 14 hours. On average, 10 of the 80 bugs are critical, high, or exploitable. Cloudflare sends these to human review first and patches them in production in 5 days. Cloudflare calls the Fixer "the youngest and slowest part of the system."
Cloudflare gives this advice for teams that build their own harness:
- Start with a skill and get the prompts working.
- Build the smallest harness: reconnaissance, hunting, and validation, with findings in a database.
- Use a separate validator "that can't file its own findings."
- Add cross-repository tracing only when more than one repository matters.
- Add deduplication agents only when the noise is too much to read.
- Make the harness model-agnostic from the first day.
Which vulnerability classes the agents hunt
Cloudflare's harness has about ten built-in attack classes, including many forms of injection, memory corruption, protocol parsing, and timing side channels. During reconnaissance, the agent can add classes that are specific to the repository, each with its own method.
The open skill groups its hunting guidance into ten domain files:
| Domain | Examples of what hunters check |
|---|---|
| AI, LLM, and agents | Context, retrieval, and memory attacks |
| Client side and browser | DOM and object-state attacks |
| Cloud and deployment | Workload identity and IAM |
| Data isolation and lifecycle | Storage, cache, export, backup, deletion |
| Desktop, mobile, and local IPC | Deep links, callbacks, navigation |
| Memory safety, binary, and kernel | Parsers, allocators, FFI, concurrency |
| Protocols, RPC, and messaging | Producer and consumer pairs, streaming, queues |
| Resource exhaustion | Computational amplification |
| Supply chain and release | Dependency resolution, CI isolation, release signing |
| HTTP protocol and authentication | HTTP framing, cache, authentication |
Reconnaissance picks the domains that apply to the target, so a web service and a kernel driver get different hunters.
Security review on every merge request
Full audits find old bugs. Cloudflare also reviews each merge request with agents, so new bugs do not reach production. Its AI code review post (April 2026) reports one month of use across 5,169 repositories:
| Measure | Value |
|---|---|
| Review runs | 131,246 |
| Merge requests reviewed | 48,095 |
| Findings | 159,103 |
| Average cost per review | $1.19 |
| Median cost per review | $0.98 |
| 99th percentile cost | $4.45 |
| Median duration | 3 minutes 39 seconds |
| Prompt cache hit rate | 85.7% |
Up to seven specialist reviewers run on each merge request (see how to compare AI code reviewers). Security is one of them. A coordinator agent removes duplicates and filters the results. The security reviewer flags only issues that are "exploitable or concretely dangerous." A critical finding blocks the merge. A person can override the block with a "break glass" comment. That happened 288 times, on 0.6% of merge requests.
Cloudflare also sells the pattern. Its vulnerability discovery and remediation service (September 2026, early access) uses OpenAI's Daybreak models, including GPT-5.6 Cyber, for reconnaissance, hunting, and validation. It also uses live traffic. A reconnaissance agent maps real request paths to the code, and network evidence adjusts the risk rating. The output is a code patch and, where the route allows it, a web application firewall (WAF) rule that blocks the attack before the patch ships.
Pick the model with data
Model choice changes both the score and the cost. DeepsecBench scores each model on 50 entry-point files against 231 known findings. The score is a recall-weighted F2 score. It weights recall twice as much as precision, because a missed vulnerability stays unfixed.
| Model run | Score | Recall | Precision | Cost | Time |
|---|---|---|---|---|---|
| GPT-5.6 Sol xhigh | 35.58 | 30.7% | 96.3% | $55.98 | 3 h 39 min |
| Claude Opus 5 max | 32.57 | 28.1% | 88.0% | $127.93 | 2 h 34 min |
| Claude Opus 5 medium | 28.36 | 24.7% | 70.5% | $31.96 | 47 min |
| Kimi K3 high | 17.56 | 14.7% | 77.1% | $12.38 | 1 h 59 min |
| Grok 4.5 high | 15.58 | 13.0% | 77.8% | $5.60 | 1 h 24 min |
Vercel scales the benchmark cost to a full repository sweep: about $1,200 with Kimi K3, or over $5,000 with the top frontier model. Some models refuse the work. Fable 5 is not in the benchmark because it "declines security work, including defensive tasks" (our ExploitBench post covers its offensive results). Test refusals on your own code before you choose a model.
Compare the options
deepsec suits one application or service. The skill runs in any coding agent. Cloudflare's harness covers a fleet of repositories, and merge request review catches new bugs before they ship.
| deepsec | security-audit-skill | Cloudflare internal harness | Cloudflare code review | |
|---|---|---|---|---|
| Scope | Whole repository, or a diff | Whole repository | Fleet of repositories | Each merge request |
| How candidates are found | Regex matchers, then agents | Coverage ledger, hunter waves | Hunter agents across repositories | Specialist reviewers on the diff |
| How findings are checked | Revalidation agent run | Fresh verifier per candidate and per record | Separate system, different model | Coordinator filters findings |
| Output | Tickets in JSON or markdown | Reports and findings.json |
Patches for human review | Review comments, merge block |
| License | Apache 2.0 | MIT | Internal | Internal |
| Best fit | Applications and services | Any agent, any codebase | Large fleets | Every team that merges code |
Choose by scope:
- To review each change, add agent review to the merge request with a block on critical findings.
- To audit one important application, run deepsec or the skill several times and merge the results.
- To cover many repositories, build a harness with a separate validation stage and a shared findings database.
Treat the scanned code as untrusted input
A security agent reads code that an attacker may control, so the code can carry a prompt injection. The risky inputs are dependencies, vendored code, and the text of a pull request. Each team puts a control at that boundary:
- deepsec. The docs say to treat it "like a coding agent with full shell access" (see your coding agent is an unmanaged endpoint). In Vercel Sandbox, the model API keys are injected outside the sandbox, so code in the sandbox cannot read them. Network traffic can reach only the model hosts.
- security-audit-skill. The skill runs target code only in an OS-enforced sandbox with no network. Only the parent agent can write to shared files.
- Cloudflare's managed service. It "treats source code, logs, and request metadata as evidence to inspect, rather than instructions to follow." It logs every tool call and checks it against an access policy.
- Cloudflare's code review. It removes prompt boundary tags (the markers that separate instructions from data) from merge request text before it builds the prompt.
We cover where to put these controls in AI agent runtime security.
How to start
- Pick one application that handles authentication, payments, or customer data.
- Run deepsec or the security-audit-skill on it in a sandbox, with a cost limit.
- Run it at least three times. Merge and deduplicate the findings.
- Have a security engineer review every confirmed finding. Record each false positive and its cause.
- Write custom matchers or attack-class notes for the false positives and the missed areas. Run again.
- Add agent review to merge requests, with a block on critical findings and a logged override.
- Measure the validator rejection rate and the share of actionable findings each month. Cloudflare reached a rejection rate of 11%. Use that as a target.
Do not let an agent merge its own fix. Both Vercel and Cloudflare keep a person on the final step.
How OpenNash helps
OpenNash puts forward-deployed engineers on your team to build AI security pipelines that run in production. We work with Fortune 2000 companies. A typical engagement follows these steps:
- Review your applications, repositories, and current security tools. Find where an AI audit gives the highest business value and the fastest ROI.
- Get the data ready: the architecture notes, ownership data, and past findings that the hunters and verifiers need.
- Build evals from your own known vulnerabilities before you choose a model.
- Pick the model for each stage, with a different model for validation, and set cost limits.
- Ship the audit pipeline and merge request review with sandboxing, audit trails, and human approval for every fix.
- Train your security team to own the matchers, prompts, and metrics.
Book a call with an OpenNash forward-deployed engineer, or email [email protected]. In the first session, we review your top AI use cases and data and show which ones give the highest business value and the fastest ROI.