Skip to main content
An industrial robotic arm on a round base, drawn in dots

What is a defense factory?

A defense factory is a continuous, agent-first operation that finds, validates, and fixes security weaknesses. Where the term comes from and how it works.

Explainer
Updated 10 min read

Definition

Defense factory

Also called Defence factory, Continuous defense loop, Agentic vulnerability remediation

A defense factory is a continuous, agent-first security operation in which AI agents find, validate, and fix weaknesses on a loop, using a team's existing tools, reusable skills, and isolated environments, with people reviewing consequential changes. OpenAI named the idea in September 2026, when it published the architecture of its own Defense Factory for vulnerability management, and it applies the software-factory model, where agents do the work and automated checks decide what ships, to defense.

OpenAI's false-positive rate after dynamic validation
0.81%
Share of OpenAI's findings that agents identified as duplicates
37%
Synthetic vulnerabilities found by AIxCC finalists' systems
54 of 63
Security fixes CodeMender upstreamed to open source in six months
72

Where the term comes from

OpenAI introduced "Defense Factory" in September 2026 with a public playbook arguing that traditional defenses alone are no longer enough, because "agents can now conduct long-running cyber operations by abusing increasingly available open-weight models." Its answer was "an automated defense operation to find, validate and fix vulnerabilities continuously." The playbook names teams at Cloudflare, Ramp, and Google as exploring the same approach, though the Ramp and Cloudflare write-ups it links don't use the term themselves. OpenAI has since turned part of the idea into a product, Daybreak Defense Factory, which takes findings from existing security tools, has agents investigate each one, and prepares patches for engineers to review.

The name borrows from software factories, where agents write and test code and automated checks decide what ships. A defense factory points that machinery at your own weaknesses. The premise is a race: attackers using broadly available models can find and chain flaws faster than a human-paced patch cycle, so defenders use their two advantages, direct access to their own code and frontier models that are ahead of what's broadly available, to fix things first. OpenAI calls that head start "the defender's window."

How a defense factory works

OpenAI's design runs a loop of five stages, each feeding the next:

StageWhat agents doThe bottleneck it removes
InventoryReconcile cloud records, deployment config, and ownership data into an asset mapNobody knows what's exposed or who owns it
DiscoveryScan, analyze code, and import findings from existing toolsFindings wait for someone to investigate
Dynamic validationReproduce each finding in an isolated environmentDuplicates and false positives bury real issues
Ownership assignmentRoute each confirmed issue to a verified ownerFindings sit unassigned
Verified remediationWrite and test a patch, then retest after deploymentMerged fixes go unverified

Three pieces hold the loop together. Reusable skills, such as "security scan," "triage finding," and "fix finding," define the workflow agents follow. Isolated, reproducible environments let an agent run the vulnerable service, prove a finding is real, and test a fix; OpenAI makes them ephemeral, created for each run and discarded afterward, so one run can't contaminate the next. And a shared SECURITY.md file carries context between passes, so later runs focus on what changed instead of starting over. A control plane with policy enforcement and a credential proxy sits between agents and production systems, and an audit layer watches agent activity.

The same three pieces show up on the detection and response side. In Cotool, which applies the pattern to SOC work, agents and their skills live in Git as YAML with pull-request review, each agent runs in an isolated Linux sandbox with outbound traffic restricted per agent, and state-changing actions such as isolating a host can require approval in the app or Slack.

OpenAI built autonomy up from manual steps. It "started with small batches and human review, then removed repeated manual steps as the results earned trust," and kept separate how much work agents could do from what they were allowed to change. Its internal sprint, which mobilized more than 250 people across more than 100 service areas, reported these results:

  • 90.6% of agent ownership assignments accepted after routing.
  • 37% of findings identified as duplicates.
  • 19.5% of findings reproduced at runtime, with a 0.81% false-positive rate after that validation.
  • 100% of remediation written by Codex, with a 0.53% rolled-back fix rate.

The sprint also exposed a gap the loop's last stage exists to close: a merged patch isn't a deployed fix, so OpenAI added checks that retest fixes after deployment.

Detection-side numbers are scarcer. Ramp's detection and response team, which runs Cotool agents on every SIEM alert, reports alerts growing from about 4,000 to more than 40,000 a year with no added analysts, triage per alert falling from about 30 minutes to under a minute, and each false positive becoming a proposed rule change an engineer reviews and merges (Cotool). That is one team's vendor-published case study, not a sprint with a stated method.

The work that led here

The defense factory pulls together a few years of agentic security research that each covered part of the loop:

  • Big Sleep. Google Project Zero and DeepMind's agent found an exploitable stack buffer underflow in SQLite in late 2024, which they believed was the first public case of an AI agent finding an unknown memory-safety bug in widely used software. In July 2025, Google said Big Sleep, working from Google Threat Intelligence leads, found CVE-2025-6965 before attackers could use it.
  • DARPA's AI Cyber Challenge (AIxCC). In the August 2025 final, seven teams' autonomous systems hunted through 54 million lines of code, found 54 of 63 synthetic vulnerabilities, and patched 43. They also found 18 real vulnerabilities. Team Atlanta won.
  • Aardvark. OpenAI's October 2025 agent built a threat model of each repository, scanned new commits, tried to trigger each suspected bug in a sandbox, and attached a Codex patch for review. It found 92% of known and seeded vulnerabilities in benchmark repositories and is now Codex Security.
  • CodeMender. Google DeepMind's agent upstreamed 72 security fixes to open-source projects in its first six months, using a critique agent to check each patch for regressions before human review.
  • Anthropic. Anthropic trained Claude Sonnet 4.5 specifically on finding and patching vulnerabilities while "deliberately" avoiding offense-favoring skills, and now runs Claude Security scans that suggest fixes, each of which a human must approve.

Ramp's security team published a smaller-scale version. In a four-hour hackathon and less than a week of work, one engineer built a coordinator agent that launched detector agents per vulnerability class, had adversarial "manager" agents critique their findings, had a validator write an integration test that fails while the bug exists, and had a fixer patch until the test passed. Ramp reports the pipeline fixed nearly 100 issues that earlier penetration tests, bug bounty, and trials of 10+ scanning vendors hadn't surfaced, and it stopped at a pull request for an engineer to merge.

The published results come with limits. The Big Sleep team called its SQLite find "highly experimental" and said a target-specific fuzzer would likely be at least as effective. Anthropic found that only 15% of Claude's patches in one test matched human reference patches, though it notes some non-matching patches may still be correct. Ramp abandoned having agents reproduce findings against a live deployment because complex preconditions defeated them, and switched to test-based validation. OpenAI found environment setup was the constraint on validation, so it started with services it could run repeatedly.

Defense factory vs detection factory vs SOAR

The three terms describe different machines:

Defense factoryDetection factorySOAR
What it producesValidated, tested fixes for weaknessesTested, tuned detection rulesExecuted playbook steps
Works onYour code and systemsYour logs and alert historyAlerts and cases
Who decides the stepsAgents, guided by skillsAgents, gated by backtestsA person, in advance
Improves itself byReusing context and skills each passTurning alert verdicts into tuningIt doesn't, until someone edits the playbook

A defense factory reduces how much an attacker can exploit. A detection factory improves how fast you notice when they try, using the same idea: agents write the rule, and an independent check, such as a backtest against known true positives, decides whether it ships. In Cotool's version of that gate, a tuning change built from 136 false positives closed in triage cuts a detection's alerts from 142 to 1 over a 30-day backtest, and the backtest shows 6 of 6 known true positives still firing before anyone applies it. SOAR runs workflows that a person scripted step by step, so it repeats rather than learns.

Why it matters for a SOC

OpenAI's playbook is about vulnerabilities, but its logic reaches the SOC. If attackers' agents shorten the time from flaw to exploit, the detection side has to speed up too, and the same factory traits apply: continuous intake, agents doing the investigation, checks a machine can enforce, and feedback that makes the next pass better. Anthropic's 2025 post names SOC automation and SIEM analysis as areas it wants defenders to test.

Cotool is one example of that pattern applied to detection and response; its seed announcement calls the goal a "distributed factory" of agents that close the loop between detection and response. Mapped onto the defense factory's stages, Cotool's version runs like this:

  • Discovery. Cotool Hunt crawls blogs, government databases, and disclosures for threat intel, scores each item for relevance and exposure to your environment, and threat-models the environment to run hypothesis-driven hunts. In the week shown on its Hunt page, 214 intel items were ingested, 38 were huntable, 9 were relevant, and 1 matched an exposed system, which produced a new detection, argocd_rce.py, watching for the exploit.
  • Validation and remediation. When a hunt returns findings, the agent backtests a new detection and ships it, so the gap is covered next time. Cotool detections are Python, and coding agents such as Claude Code, Codex, or Cursor can write, test, and deploy them through Cotool's MCP server. In Cotool's example, asked for a detection on AWS access keys created outside Terraform, the agent searches 1,204 CreateAccessKey events from 30 days of CloudTrail, writes a 24-line detection, tests it over 30 days (2 hits, 0 false positives), and deploys it to run every 15 minutes.
  • Feedback. Agents investigate every alert, and each verdict feeds back into the detection that fired it, so false positives found during response refine the upstream rule.
  • Verification. An AI judge grades every agent run against acceptance criteria and flags a broken integration as soon as it fails, the detection-side counterpart of OpenAI retesting deployed fixes.

The pitfalls carry over too. A loop is only as good as its validation step, which is why OpenAI reports its false-positive rate after reproduction rather than before. Agents with write access are a risk of their own, so OpenAI keeps credentials behind a proxy. Cotool's response-side equivalent: an agent can call only the tools it has been granted (Cotool docs), and the audit log records every agent execution and tool call with its parameters, exportable to a SIEM (Cotool audit logs). And when you're comparing vendors that claim to close the loop, the AI SOC evaluation guide covers what to test.

  • Detection factory: the factory pattern applied to writing and tuning detection rules. See what a detection factory is.
  • AI SOC: a SOC where agents take the first pass on every alert. See what an AI SOC is.
  • SOAR: playbook-driven automation for security operations. See what SOAR is.
  • Dynamic validation: reproducing a suspected vulnerability in a running environment before treating it as real.
  • Agentic offensive framework: the attacker-side tooling a defense factory races against. See what ARTEX is and abliterated models.

FAQ

Who coined the term defense factory?
OpenAI coined the term Defense Factory in September 2026, when it published the architecture and lessons from its internal effort to find, validate, and fix vulnerabilities with agents. It named Cloudflare, Ramp, and Google as teams exploring the same approach. OpenAI has since packaged part of it as a product, Daybreak Defense Factory.
Is a defense factory the same as a detection factory?
A defense factory and a detection factory use the same pattern but work on different things. OpenAI's defense factory finds and fixes weaknesses in your own code and systems. A detection factory writes, tests, and tunes the rules that catch attackers in your logs. One shrinks the attack surface; the other improves what you see when someone attacks it.
How is a defense factory different from SOAR?
A defense factory differs from SOAR in who decides the steps. SOAR runs playbooks that a person scripted in advance, so it repeats the same workflow every time. In a defense factory, agents investigate each finding, write and test a fix, and get better as reusable skills and shared context improve, while people set boundaries and review changes.
Do defense factories run without humans?
Defense factories, as published so far, do not run without humans. OpenAI started with small batches and human review and kept people reviewing consequential changes and verifying deployed fixes. Google reviews every CodeMender patch before it goes upstream, Anthropic requires human approval for every Claude Security patch, and Ramp's agents stopped at a pull request for an engineer to merge.
How do I start building a defense factory?
Start a defense factory with one workflow you already run by hand, such as triaging scanner findings. Give agents a reproducible environment to test in, write the workflow as a reusable skill, keep a human review step, and measure accuracy before widening scope, as OpenAI and Ramp both did. On the detection side, the equivalent first loop is a coding agent that writes one detection, backtests it against 30 days of logs and your known true positives, and deploys after review.

Sources

  1. Defense Factory - OpenAI · accessed November 16, 2026
  2. Daybreak Defense Factory - OpenAI · accessed November 16, 2026
  3. Daybreak for Frontline Defenders: $1B to protect essential services - OpenAI · accessed November 16, 2026
  4. Introducing Aardvark: OpenAI's agentic security researcher · accessed November 16, 2026
  5. Introducing CodeMender: an AI agent for code security - Google DeepMind · accessed November 16, 2026
  6. From Naptime to Big Sleep - Google Project Zero · accessed November 16, 2026
  7. A summer of security: empowering cyber defenders with AI - Google · accessed November 16, 2026
  8. AI Cyber Challenge marks pivotal inflection point for cyber defense - DARPA · accessed November 16, 2026
  9. Building AI for cyber defenders - Anthropic · accessed November 16, 2026
  10. Bringing the cybersecurity capabilities of Claude Mythos 5 to more defenders - Anthropic · accessed November 16, 2026
  11. We proactively fixed ~100 security issues in 6 days with 0 humans - Ramp Engineering · accessed November 16, 2026
  12. Build your own vulnerability harness - Cloudflare · accessed November 16, 2026
  13. Announcing our $7.4m seed fundraising - Cotool · accessed November 16, 2026
  14. AI Threat Hunting and Actionable Threat Intel - Cotool · accessed November 16, 2026
  15. AI Detection Engineering with Python Detections - Cotool · accessed November 16, 2026
  16. AI SOC Without the Black Box - Cotool · accessed November 16, 2026
  17. How Ramp Scaled Detection & Response With Cotool · accessed November 16, 2026
  18. Tools and Integrations - Cotool Documentation · accessed November 16, 2026
  19. Audit Logs - Cotool Documentation · accessed November 16, 2026

Keep reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo