
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sat, 13 Jun 2026 03:22:20 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Defend against frontier cyber models: Cloudflare's architecture as customer zero]]></title>
            <link>https://blog.cloudflare.com/frontier-model-defense/</link>
            <pubDate>Tue, 09 Jun 2026 06:00:00 GMT</pubDate>
            <description><![CDATA[ In our post about Project Glasswing, we made the argument that the architecture around a vulnerability matters more than the speed of the patch. Here we walk through what that architecture looks like, the threats it defends against, and how we run it ourselves as Cloudflare's customer zero. ]]></description>
            <content:encoded><![CDATA[ <p></p><p></p><p>A few weeks ago, we <a href="https://blog.cloudflare.com/cyber-frontier-models/"><u>wrote about Project Glasswing</u></a> and what we observed when we pointed cyber frontier models at our own code. Since then, we’ve seen that the part of the post that has resonated most deeply is the argument that the architecture around the vulnerability matters more than the speed of the patch.</p><p>In the conversations we've had with CISOs and security teams since, the questions have been consistent: what does our architecture actually look like, what should we monitor for, where do we start, and how can Cloudflare help?</p><p>Before getting into the details: the architecture below is built almost entirely from Cloudflare's own products, because Cloudflare security is <a href="https://blog.cloudflare.com/tag/customer-zero/"><u>customer zero</u></a> for the security products we build. The Cloudflare stack already exists in front of our code, employees, and customer-facing applications. If you're a Cloudflare customer, every layer below is available to you today. If you're not, the principles still apply to whatever stack you've built.</p>
    <div>
      <h2>What a cyber frontier model actually changes</h2>
      <a href="#what-a-cyber-frontier-model-actually-changes">
        
      </a>
    </div>
    <p>In the <a href="https://blog.cloudflare.com/cyber-frontier-models/"><u>previous post</u></a>, we showed how a cyber frontier model like Mythos changes the attacker’s timeline. It can find vulnerabilities, reason through exploit chains, and generate working proofs faster than earlier models. While models like Mythos do not change the shape of an intrusion — reconnaissance, initial access, lateral movement, persistence, and exfiltration still have to happen — the difference is in the speed and scale. When pointed at the open web, a model can find and hit low-hanging fruit quickly. Against a hardened target, it still has to probe, and adapt, and it often produces more noise than a careful human operator would.</p><p>Discovery, exploit chain construction, and proof-of-concept generation used to be the gating constraints on producing a working attack. A frontier model handles all three in a fraction of the time. Work that used to be slow and methodical is now fast and indiscriminate.</p><p>While AI is accelerating how fast developer teams at Cloudflare and many other companies can ship code, the security team’s work has not compressed the same way. An attacker only needs one opening to get in, while security teams need to find and close them all. Writing a fix, regressing it, and shipping it without breaking the code around it has constraints that AI doesn't remove. We learned this the hard way when we let an AI coding assistant write its own patches against our own bugs, as we described at the end of the previous <a href="https://blog.cloudflare.com/cyber-frontier-models/"><u>post</u></a>. Some of those patches fixed the original bug while quietly breaking something else the code depended on.</p><p>As these models become more competent and capable, our main focus from a threat standpoint comes down to three things. Each one shapes the architecture we walk through in the rest of this post.</p><ul><li><p>The first is the <b>speed of discovery.</b> Frontier models make it easier to search large bodies of public code, including the open-source libraries that many companies depend on. That does not mean every bug in a library is exploitable, or that library bugs are where most vulnerabilities live. Exploitability still depends on how the code is used, whether attacker-controlled input can reach the vulnerable path, and the protections that sit around it. But widely used open-source libraries and frameworks give attackers a shared surface to study at scale. When a real, reachable vulnerability exists there, a model can help find it, reason about possible exploit paths, and generate proof-of-concept variants faster than maintainers and defenders can review every downstream use. The gap between when an attacker discovers a vulnerability and when defenders learn it exists is what worries us most. If you are not running these models against your own code, it is safe to assume someone else is.</p></li><li><p>The second is <b>exploit</b> <b>volume and adaptation.</b> A model can produce thousands of variations of a single exploit and run reconnaissance at the same scale. All that volume gives an attacker an advantage, but it won’t necessarily get them past signature-based detections. Many of those iterations will have the same underlying signature, so a rule that catches the first one will catch the rest. Adaptation is how they will get past signature-based detections. Ask a model to show you a SQL injection, and it will return a textbook example. Tell it there is a WAF in the way, and it will start probing, learning what gets blocked, and rewriting the payload until it can slip past the rule blocking it. </p></li><li><p>The third is <b>the impact when a vulnerability is inevitably exploited. </b>No architecture catches everything. After the vulnerability is exploited, the question we ask ourselves is: where can the attacker get to with one identity, one path, or one credential, before something else stops them? If the answer is "anywhere they want," the vulnerability was never the problem. The architecture around the vulnerability was.</p></li></ul>
    <div>
      <h2>Cloudflare’s superpower: visibility</h2>
      <a href="#cloudflares-superpower-visibility">
        
      </a>
    </div>
    <p>We see roughly a fifth of the web and that tells us, in real time, which payloads are mutating, which patterns are picking up, and where attacker tooling is moving next. Two teams turn that visibility into defense.</p><p>First is <a href="https://www.cloudflare.com/cloudforce-one/"><b><u>Cloudforce One</u></b></a>, our threat intelligence, research, and operations team, which sits within the Cloudflare security organization. They turn what we see across the network into insights the rest of the stack can act on: tracked adversaries, emerging campaigns, and indicators of compromise (IOCs). The hard part of this work was never knowing what is malicious — it was the delay in mitigation. Knowledge of a new threat normally has to travel from a threat report, into a feed, and then into a company’s defense before it can be used to block anything. Attackers have learned to move faster than that. Our network closes that gap: Cloudflare customers can now use Cloudforce One threat intelligence <a href="https://blog.cloudflare.com/realtime-threat-intel-waf-rules/"><u>directly within the WAF</u></a> to block high-risk traffic.</p><p>Second is the team that owns the WAF engine that does the actual detecting: the managed rulesets that run in front of our own properties and are available to every Cloudflare customer, the machine learning behind <a href="https://developers.cloudflare.com/waf/about/waf-attack-score/"><u>WAF Attack Score</u></a>, and the relationships that sometimes let us ship a rule before a CVE is publicly disclosed. The team is globally distributed and moves fast, releasing rules within hours of a proof-of-concept of an attack becoming known. Once a detection is deployed, it reaches our entire network, along with every Cloudflare customer, in under 30 seconds. <a href="https://blog.cloudflare.com/react2shell-rsc-vulnerabilities-exploitation-threat-brief/"><u>React2Shell</u></a> is a recent example: a managed WAF rule <a href="https://blog.cloudflare.com/waf-rules-react-vulnerability/"><u>was protecting our own properties, and everyone else's on Cloudflare</u></a>, hours before the official advisory was published.</p><p>The scoring layer, the defenses we put in front of the application, and the containment around the vulnerability all build on what these two teams see. </p>
    <div>
      <h2>Scores over signatures</h2>
      <a href="#scores-over-signatures">
        
      </a>
    </div>
    <p>Signature-based defenses were built for a world where novel exploits were scarce and variations took weeks. Cloudflare's traditional SLA from a fresh proof-of-concept to a live, deployed rule has been 12 hours. With the advent of frontier models, this is not good enough anymore. Detections need to be in place <a href="https://blog.himanshuanand.com/2026/05/the-90-day-disclosure-policy-is-dead/"><u>before a CVE is discovered</u></a>. This is why we layer ML-based detection in front of the traditional signature-based WAF.</p><p>The model is trained on a large body of past attack traffic, and it catches new variants of vulnerabilities before they're publicly known. A novel <a href="https://www.cloudflare.com/learning/security/threats/sql-injection/"><u>SQL injection</u></a> or remote code execution chain is almost always a rearrangement of attack shapes the model has seen before, even when the specific exploit is brand new. We run the model on every request and assign a WAF Attack Score between 1 and 99, based on how closely the request resembles those underlying shapes, not against a list of known-bad signatures. The lower the score, the more aggressively we treat the request. That score determines whether we let the request through. We apply a similar scoring methodology to AI prompts with <a href="https://developers.cloudflare.com/waf/detections/ai-security-for-apps/"><u>AI Security for Apps</u></a>: rather than check each prompt against a list of known malicious prompts, we score how closely a prompt resembles an actual attack. </p>
    <div>
      <h2>The architecture around the vulnerability</h2>
      <a href="#the-architecture-around-the-vulnerability">
        
      </a>
    </div>
    <p>Those capabilities only matter once they're stacked in front of an application, and the first layer in our defense-in-depth approach is the <a href="https://www.cloudflare.com/en-gb/application-services/products/waf/"><b><u>WAF</u></b></a>. Anything that matches a known-bad pattern gets dropped before it reaches the application, which clears the bulk of the obvious traffic and lets the more specialized layers below focus on what's left.

On the API surface, we run a positive security model through <a href="https://www.cloudflare.com/en-gb/application-services/products/api-shield/"><b><u>API Shield</u></b></a>. Instead of trying to anticipate every bad request, we describe what a valid request to each API looks like, either from the API's own definition or learned from our real traffic, and anything that doesn't fit doesn't get through. This neutralizes the advantage of frontier AI models: because we only permit validated traffic, generating thousands of new attack variations fails to bypass the system.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5KSSyocxKzsJsOfG4pxOM7/059a597af1b67a3d5a5ccdeda5ab7ca1/image2.png" />
          </figure><p><sup><i>Cloudflare’s layered architecture</i></sup></p><p><a href="https://www.cloudflare.com/learning/bots/what-is-bot-management/"><b><u>Bot Management</u></b></a> catches probing traffic on our network before frontier models can build a map. It scores every request on how likely it is to be automated, using the same signals across our whole network: how the client behaves, whether it looks like a real browser, and whether the connection matches a known-bad pattern. An attack only lands if it can find a soft spot. </p><p><a href="https://www.cloudflare.com/sase/products/access/"><b><u>Zero Trust Network Access</u></b></a> is used for every internal application. The implicit trust of being inside the network is replaced with explicit per-request identity and policy for every employee accessing every tool. The value of this was clear when one of our engineers shipped a misconfigured tool. A flat network would have exposed everything on the same segment, but in our deployment, the exposure stopped at the tool itself. We built <a href="https://developers.cloudflare.com/cloudflare-one/access-controls/access-settings/require-access-protection/"><b><u>Require Access Protection</u></b></a> afterwards so newly deployed or misconfigured applications can't be reachable before an access policy is in place.</p><p><a href="https://developers.cloudflare.com/cloudflare-one/integrations/identity-providers/idp-federation/"><b><u>IdP Federation</u></b></a> makes that secure by default posture easier to keep consistent across every Cloudflare account — which becomes even more necessary when more people are shipping internal tools quickly. Instead of asking each team to wire up SSO separately, we configure our identity provider (IdP) once and share it across the organization. New accounts get SSO automatically, recipient-side IdP connections are read-only, and Access policies in each account still evaluate the resulting identity as part of the normal request flow. </p><p><a href="https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/"><b><u>MCP Server Portal</u></b></a> gives teams a controlled way to connect AI agents to enterprise systems. Agents access MCP servers that are centrally managed through a single portal, with every action logged. That way when an agent acts on someone's behalf, we know what it did, what it touched, and whether it should have been allowed to. The full picture of how we built it is in our post on <a href="https://blog.cloudflare.com/enterprise-mcp/"><u>enterprise MCP</u></a>.</p><p><a href="https://www.cloudflare.com/developer-platform/products/ai-gateway/"><b><u>AI Gateway</u></b></a> runs in front of our internal AI tools the same way <a href="https://developers.cloudflare.com/waf/detections/ai-security-for-apps/"><u>AI Security for Apps</u></a> runs in front of customer-facing AI features, with the same scoring and the same visibility. Inside the company, the visibility piece is more useful than the blocking, because we needed to see what engineers were actually building before we could write meaningful policy on it.</p>
    <div>
      <h2>Where your teams can start </h2>
      <a href="#where-your-teams-can-start">
        
      </a>
    </div>
    <p>Frontier models can help attackers find vulnerabilities, adapt payloads, and move faster, but they still have to pass through the layered defense you deploy in front of your application. That is where teams should start:</p><ul><li><p>Put inspection in front of public applications.</p></li><li><p>Define what valid API traffic looks like.</p></li><li><p>Use bot detection to limit automated probing.</p></li><li><p>Require identity and access policy before any internal tool is reachable.</p></li></ul><p>For AI and agentic systems:</p><ul><li><p>Route model traffic through a gateway.</p></li><li><p>Keep agents connected through approved MCP servers.</p></li><li><p>Log what they do. </p></li></ul><p>The goal is to make sure that when one layer misses, the next layer limits what the attacker can see, reach, or change.</p><p>That is the point of the architecture around the vulnerability: to limit the scope of an attack. The vulnerability may be what starts the attack, but the architecture determines how far it can go.</p>
    <div>
      <h2>How do we know this approach works?</h2>
      <a href="#how-do-we-know-this-approach-works">
        
      </a>
    </div>
    <p>Plenty of security stacks look impenetrable on a whiteboard but fall over in practice. That is why we test ours continuously, both at the perimeter and inside our environment, with our red team involved across both.</p><p><b>At the perimeter</b>, frontier models are one tool we use to test our application security stack as an adaptive attacker. These models sit alongside the rest of our red team and detection workflows including: manual testing, threat intelligence, observed traffic patterns, proof-of-concept analysis, and signals from our own network. Together, those inputs help us decide where to aim testing: newly launched products, recently changed surfaces, and the paths an attacker is most likely to probe first. The most important part is the process that follows. When something gets through, we identify the gap, use the right mix of tools to understand it, write the rule or mitigation, ship the update, and test again to make sure the gap is closed.</p><p><b>Inside the environment,</b> our red team starts from the assumption that the perimeter has already failed. They look at what has changed, where sensitive systems carry risk, and whether one compromised identity, path, or credential can reach farther than it should. When we change the architecture based on what they find, they run the scenario again against the new version to confirm the gap is actually closed.</p><p>We confirm that this architecture is working by continuously testing its behavior during failures, rather than relying on the perfection of individual layers.</p><p>If your team is working on the same problems and would like to compare notes, reach out to us at <a href="#"><u>security-ai-research@cloudflare.com</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[Risk Management]]></category>
            <category><![CDATA[Customer Zero]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Cloudforce One]]></category>
            <category><![CDATA[Bot Management]]></category>
            <guid isPermaLink="false">5Jw5AkmauDqCVgDeCs0mBa</guid>
            <dc:creator>Rohit Chenna Reddy</dc:creator>
            <dc:creator>Chase Catelli</dc:creator>
            <dc:creator>Dan Jones</dc:creator>
        </item>
        <item>
            <title><![CDATA[Project Glasswing: what Mythos showed us]]></title>
            <link>https://blog.cloudflare.com/cyber-frontier-models/</link>
            <pubDate>Mon, 18 May 2026 06:00:00 GMT</pubDate>
            <description><![CDATA[ In recent weeks, we pointed Mythos and other security-focused LLMs at live code across critical parts of our infrastructure. We share what we observed, the models’ strengths and weaknesses, and what the work around them needs to look like before any of it can scale. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>For the last few months, we've been testing a range of security-focused LLMs on our own infrastructure. These LLMs  help identify potential vulnerabilities in our own systems, so we can fix them – and they also show us what attackers are going to be able to do with the latest models.</p><p>None of these LLMs has captured more attention than Mythos Preview, from Anthropic. A few weeks ago, we were invited to use Mythos Preview as part of <a href="https://www.anthropic.com/glasswing"><u>Project Glasswing</u></a>. We soon pointed it at more than fifty of our own repositories – to see what it would find, and to see how it works. </p><p>This post shares what we observed, what the models did well and what they didn't, and how the architecture and process around them needs to change, so they can be used at scale.</p>
    <div>
      <h2>What changed with Mythos Preview</h2>
      <a href="#what-changed-with-mythos-preview">
        
      </a>
    </div>
    <p>Mythos Preview is a real step forward, and it's worth saying that plainly before getting into anything else. We've been running models against our code for a while now, and the jump from what was possible with previous general-purpose frontier models to what Mythos Preview does today is not just a refinement of what came before.</p><p>It's a different kind of tool doing a different kind of work, and that makes a clean apples-to-apples comparison to earlier models difficult. So rather than trying to benchmark Mythos Preview against general-purpose frontier models, it's more useful to describe what it can actually do, and two features that stood out across the work we did with Mythos Preview:</p><ul><li><p><b>Exploit chain construction -</b> A real attack rarely uses one bug. It chains several small attack primitives together into a working exploit. For instance, it might turn a use-after-free bug into an arbitrary read and write primitive, hijack the control flow, and use return-oriented programming (ROP) chains to take full control over a system. Mythos Preview can take several of these primitives and reason about how to combine them into a working proof. The reasoning it shows along the way looks like the work of a senior researcher rather than the output of an automated scanner.</p></li><li><p><b>Proof generation -</b> Finding a bug and proving it's exploitable are two different things, and Mythos Preview can do both. It writes code that would trigger the suspected bug, compiles that code in a scratch environment, and runs it. If the program does what the model expected, that's the proof. If it doesn't, the model reads the failure, adjusts its hypothesis, and tries again. The loop matters as much as the bugs it finds, because a suspected flaw without a working proof is speculation, and Mythos Preview closes that gap on its own.</p></li></ul><p>Some of what we describe above is not entirely unique to Mythos Preview. When we ran other frontier models through the same harness, they found a fair number of the same underlying bugs, and in some cases they got further than we expected on the reasoning side too. Where they fell short was at the point of stitching the pieces together. A model would identify an interesting bug, write a thoughtful description of why it mattered, and then stop, leaving the actual chain unfinished and the question of exploitability open. What changed with Mythos Preview is that a model can now take those low-severity bugs (which would traditionally sit invisible in a backlog) and chain them into a single, more severe exploit. </p>
    <div>
      <h2>Model refusals in legitimate vulnerability research</h2>
      <a href="#model-refusals-in-legitimate-vulnerability-research">
        
      </a>
    </div>
    <p>The Mythos Preview model provided by Anthropic, as part of Project Glasswing, did not have the additional safeguards that are present in generally available models (like Opus 4.7 or GPT-5.5).</p><p>Despite this, the model organically pushes back on certain requests - much like the cyber capabilities that made it useful for vulnerability hunting, the model has its own emergent guardrails that sometimes cause it to push back on legitimate security research requests. But as we found, these organic refusals aren’t consistent - the same task, framed differently or presented in a different context, could produce completely different outcomes as illustrated in the examples below.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5St6rLRq9wkuxwmLHZ88CV/b4eb948c917ef7f7b0028ccc8ec0aefe/image2.png" />
          </figure><p><sup><i>Example of Mythos Preview pushing back on building a working proof of concept </i></sup></p><p>For example, the model initially refused to do vulnerability research on a project, then agreed to perform the same research on the same code after an unrelated change to the project’s environment. Nothing about the code being analyzed had changed. 

In another case, the model found and confirmed several serious memory bugs in a codebase, and then refused to write a demonstration exploit. The same request, framed differently, got a different answer, and even the same request can produce different outcomes across runs due to the probabilistic nature of the model. Semantically equivalent tasks can produce opposite outcomes depending on how and when they’re presented to the model.</p><p>This matters because while the model’s organic refusals/guardrails are real, they aren’t consistent enough to serve as a complete safety boundary on their own. That’s precisely why any capable cyber frontier model made generally available in the future must include additional safeguards on top of this baseline behavior - making it appropriate for broader use outside of a controlled research context like Project Glasswing.</p>
    <div>
      <h2>The signal-to-noise problem</h2>
      <a href="#the-signal-to-noise-problem">
        
      </a>
    </div>
    <p>One of the hardest parts of triaging security vulnerabilities is deciding which bugs are real, which are exploitable, and which need fixing now. This was a hard problem even in the pre-AI world. AI vulnerability scanners and AI-generated code have made it worse, and at Cloudflare we've built multiple post-validation stages to deal with it.</p><p>Two factors dominate the noise rate:</p><ul><li><p><b>Programming language</b> - C and C++ give you direct memory control and, with it, bug classes - buffer overflows, out-of-bounds reads and writes - that memory-safe languages like Rust eliminate at compile time. We saw consistently more false positives from projects written in memory-unsafe languages.</p></li><li><p><b>Model bias</b> - A good human researcher tells you what they found and how confident they are. Models don't. Ask a model to find bugs, and it will find them, whether the code has any or not. Findings come back hedged with "possibly," "potentially," "could in theory," and the hedged findings vastly outnumber the solid ones. That's a reasonable bias for an exploratory tool. It's a ruinous one for a triage queue, where every speculative finding spends human attention and tokens to dismiss, and that cost compounds across thousands of findings.</p></li></ul><p>Mythos Preview represents a clear improvement here, particularly in its ability to chain primitives - combining multiple vulnerabilities into a working proof of concept rather than reporting them in isolation. A finding that arrives with a PoC is a finding you can act on, and it means far less time spent asking "is this even real?"</p><p>Our harnesses are deliberately tuned to over-report, so we see more (and miss less), which comes with a lot more noise. But at triage time, Mythos Preview's output has noticeably higher quality: fewer hedged findings, clearer reproduction steps, and less work to reach a fix-or-dismiss decision.</p>
    <div>
      <h2>Why pointing a generic coding agent at a repo doesn't work</h2>
      <a href="#why-pointing-a-generic-coding-agent-at-a-repo-doesnt-work">
        
      </a>
    </div>
    <p>When we first started AI-assisted vulnerability research last year, our instinct was the obvious one: point a generic coding agent at an arbitrary repository and ask it to discover vulnerabilities. This approach works, in the sense that the model will produce findings, but it doesn't work in producing meaningful coverage of a real codebase and identifying findings of value. There are two main reasons for this:</p><ul><li><p><b>Context -</b> Coding agents are tuned for one focused stream of work: building a feature, fixing a bug, writing a refactor. They ingest a lot of source code, hold a single hypothesis at a time, and iterate against it. That's exactly the wrong shape for vulnerability research, which is narrow and parallel by nature. A human researcher picks one specific thing to look at and investigates it thoroughly. That one thing might be a single complex feature, transitions across security boundaries, or a specific vulnerability class like command injections, where attacker input ends up being run as a shell command. Then they do it again, for a different feature, security boundary, or vulnerability class, several thousand times across the codebase. A single agent session (even with subagents) against a hundred-thousand-line repository can cover maybe a tenth of a percent of the surface in a useful way before the model's context window fills up and compaction kicks in - potentially discarding earlier findings that would have mattered.</p></li><li><p><b>Throughput -</b> A single-stream agent does one thing at a time, but real codebases need many hypotheses against many components at once, with the ability to fan out further when something interesting turns up. You can drive a single agent harder, but at some point you stop being limited by the model and start being limited by the shape of the interaction itself. Using the model directly in a coding agent turns out to be fine for manual investigation when a researcher already has a lead and wants a second pair of eyes. However, it's the wrong tool for achieving high coverage. Once we accepted that, we stopped trying to make Mythos Preview do the wrong job and started building the harness around it instead.</p></li></ul>
    <div>
      <h2>What a harness actually fixes</h2>
      <a href="#what-a-harness-actually-fixes">
        
      </a>
    </div>
    <p>Four lessons came out of running the work at scale, and each one pointed to the need for a harness that manages the overall execution:</p><ul><li><p><b>Narrow scope produces better findings -</b> Telling the model "Find vulnerabilities in this repository" makes it wander. Telling it "Look for command injection in this specific function, with this trust boundary above it, here's the architecture document and here's prior coverage of this area" makes it do something much closer to what a researcher would actually do.</p></li><li><p><b>Adversarial review reduces noise -</b> Adding a second agent between the initial finding and the queue - one with a different prompt, a different model, and no ability to generate its own findings - catches a lot of the noise that the first agent would miss if it just checked its own work. It turns out that putting two agents in deliberate disagreement is way more effective than just telling one agent to be careful.</p></li><li><p><b>Splitting the chain across agents produces better reasoning -</b> Asking "Is this code buggy?" and "Can an attacker actually reach this bug from outside the system?" are two different questions, and the model is better at each one when you ask them separately, because each question is narrower than the combined version.</p></li><li><p><b>Parallel narrow tasks beat one exhaustive agent -</b> Coverage improves when many agents work on tightly scoped questions and we deduplicate the results afterward, rather than asking one agent to be exhaustive.</p></li></ul><p>Each of those observations is about model behavior, and put together they describe something that isn't a chat interface anymore. It's a harness that helps you achieve the final outcomes. The first steps to building a harness are simple, as you can ask the model to help, which is what we did. We used Mythos Preview to build on, tailor, and improve our original harnesses to suit its strengths.

An example of what a harness looks like in practice is described below.</p>
    <div>
      <h2>Our vulnerability discovery harness</h2>
      <a href="#our-vulnerability-discovery-harness">
        
      </a>
    </div>
    <p>Here's what our vulnerability discovery harness looks like, stage by stage. It was used to scan live code across our runtime, edge data path, protocol stack, control plane, and the open-source projects we depend on.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1OhgJDEeyc5aq8EoF4yFJE/917c9a9d8a92d0920acb96f7d5cb66f6/image6.png" />
          </figure><figure>
    <table>
        <colgroup><col></col><col></col><col></col></colgroup>
        <tbody>
            <tr>
                <td>
                    <span><strong>Stage</strong></span>
                </td>
                <td>
                    <span><strong>What it does</strong></span>
                </td>
                <td>
                    <span><strong>Why it matters</strong></span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/5736CBrNDFnYglaRFUtGp0/2bccdc1e5b5f1b21416c6439cdb63967/BLOG-3301_image7.png" /><br />
                    Recon</strong></span>
                </td>
                <td>
                    <span>An agent reads the repository from the top down, fans out to subagents responsible for each subsystem, and produces an architecture document covering build commands, trust boundaries, entry points, and likely attack surface. It also generates the initial queue of tasks for the next stage.  </span>
                </td>
                <td>
                    <span>Gives every downstream agent shared context. Cuts the wander problem.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/7wGJ8jmh1gjMevxH31nSfv/b3bd6772cfa57939a1291cae8c4faab3/BLOG-3301_image8.png" /> <br />
                    Hunt</strong></span>
                </td>
                <td>
                    <span>Each task is one attack class paired with a scope hint. Hunters (the agents that actually look for bugs) run concurrently, typically around fifty at once, each fanning out to a handful of exploration subagents. Each hunter has access to tools that compile and run proof-of-concept code in a per-task scratch directory.</span>
                </td>
                <td>
                    <span>This is where most of the work happens. Many narrow tasks in parallel, not one exhaustive agent.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/7mMu2OOeot8CLuvu2PYAjx/144ecd5ef0785d8c6b0c7c3cd6feccc8/BLOG-3301_image5.png" /><br />
                    Validate</strong></span>
                </td>
                <td>
                    <span>An independent agent re-reads the code and tries to disprove the original finding. It uses a different prompt and has no ability to emit new findings of its own.</span>
                </td>
                <td>
                    <span>Catches a meaningful fraction of the noise the hunter wouldn't catch when reviewing its own work.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/7f8SJhTAja5bLPvydZkrv4/11a9cf6b0cee030db5f56d0dd46e0b45/BLOG-3301_image11.png" /><br />
                    Gapfill</strong></span>
                </td>
                <td>
                    <span>Hunters flag areas they touched but didn't cover thoroughly. Those areas get re-queued for another pass.</span>
                </td>
                <td>
                    <span>Counteracts the model's tendency to drift toward attack classes it has already had success with.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/5tbCM9SUgCZlYF0m9e8CY0/c48b7f90e39ddc5bd6060d5067bae0ea/BLOG-3301_image4.png" /><br />
                    Dedupe</strong></span>
                </td>
                <td>
                    <span>Findings that share the same root cause collapse into a single record.</span>
                </td>
                <td>
                    <span>Variant analysis is a feature, not a way to inflate the queue with duplicates.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/51VLQM1a40KKRdvq2HidRj/c9ad0209a54544fe783d9eb019a6f02b/BLOG-3301_image3.png" /><br />
                    Trace</strong></span>
                </td>
                <td>
                    <span>For each confirmed finding in a shared library, a tracer agent fans out (one instance per consumer repository), uses a cross-repo symbol index, and decides whether attacker-controlled input actually reaches the bug from outside the system.</span>
                </td>
                <td>
                    <span>Turns "there is a flaw" into "there is a reachable vulnerability." This is the stage that matters most.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/4UhAgIcdpKcWxNG2kO5fIN/6f883a0f993604339b5381b14f63f40d/BLOG-3301_image1.png" /><br />
                    Feedback</strong></span>
                </td>
                <td>
                    <span>Reachable traces become new hunt tasks in the consumer repositories where the bug is actually exposed.</span>
                </td>
                <td>
                    <span>Closes the loop. The pipeline gets better as it runs.</span>
                </td>
            </tr>
            <tr>
                <td>
                    <span><strong><img src="https://images.ctfassets.net/zkvhlag99gkb/558dSiaH5GNrtmKGKbUEUH/8684108e9b99580e5194245a1e20cb79/BLOG-3301_image10.png" /><br />
                    Report</strong></span>
                </td>
                <td>
                    <span>An agent writes a structured report against a predefined schema, fixes any validation errors against that schema itself, and submits the report to an ingest API.</span>
                </td>
                <td>
                    <span>Output is queryable data, not free-form prose.</span>
                </td>
            </tr>
        </tbody>
    </table>
</figure>
    <div>
      <h2>What this means for security teams</h2>
      <a href="#what-this-means-for-security-teams">
        
      </a>
    </div>
    <p>The loudest reaction to Mythos Preview from other security leaders has been about speed - scan faster, patch faster, compress the response cycle. More than one team we have spoken with is now operating under a two-hour SLA from CVE release to patch in production. The instinct is understandable: when the attacker timeline shortens, the defender timeline has to shorten with it. Faster is not going to be enough, and we think a lot of teams are about to spend a lot of time, effort, and money learning that the hard way.</p><p>Patching faster does not change the shape of the pipeline that produces the patch. If regression testing takes a day, you cannot get to a two-hour SLA without skipping it, and the bugs you ship when you skip regression testing tend to be worse than the bugs you were trying to patch. We learned a version of this when we tried letting the model write its own patches and watched a few go out that fixed the original bug while quietly breaking something else the code depended on.</p><p>The harder question is what the architecture around the vulnerability should look like. The principle is to make exploitation harder for an attacker even when a bug exists, so that the gap between when a vulnerability is disclosed and when it is patched matters less. That means defenses that sit in front of the application and block the bug from being reached. It means designing the application so that a flaw in one part of the code cannot give an attacker access to other parts. It means being able to roll out a fix to every place the code is running at the same moment, rather than waiting on individual teams to deploy it. </p><p>We also recognize this topic cuts both ways. The same capabilities that helped us find bugs in our own code will, in the wrong hands, accelerate the attack side against every application on the Internet. Cloudflare sits in front of millions of those applications, and the architectural principles described above are exactly the ones our products are built to apply on behalf of customers. We will share more on what that means for customers in the weeks ahead.</p><p>If your team is doing similar work and would like to compare notes, reach out to us at <a href="#"><u>security-ai-research@cloudflare.com</u></a>.</p><p><i>Our research with Mythos Preview was conducted in a controlled environment against our own code; every vulnerability surfaced through this work was triaged, validated, and remediated where action was needed under Cloudflare's formal vulnerability management process.</i></p><p><i>This work was a team effort. Thanks to Albert Pedersen, Craig Strubhart, Dan Jones, Irtefa Fairuz, Martin Schwarzl, and Rohit Chenna Reddy for their contributions to the research, engineering, and analysis behind this blog post.</i></p> ]]></content:encoded>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Agents]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[LLM]]></category>
            <category><![CDATA[Risk Management]]></category>
            <category><![CDATA[Threat Operations]]></category>
            <category><![CDATA[Automation]]></category>
            <category><![CDATA[Engineering]]></category>
            <category><![CDATA[Customer Zero]]></category>
            <guid isPermaLink="false">xrcYtr7kU54LNDB8MEmQY</guid>
            <dc:creator>Grant Bourzikas</dc:creator>
        </item>
        <item>
            <title><![CDATA[Shifting left at enterprise scale: how we manage Cloudflare with Infrastructure as Code]]></title>
            <link>https://blog.cloudflare.com/shift-left-enterprise-scale/</link>
            <pubDate>Tue, 09 Dec 2025 06:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare has shifted to Infrastructure as Code and policy enforcement to manage internal Cloudflare accounts. This new architecture uses Terraform, custom tooling, and Open Policy Agent to enforce security baselines and increase engineering velocity. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The Cloudflare platform is a critical system for Cloudflare itself. We are our own Customer Zero – using our products to secure and optimize our own services. </p><p>Within our security division, a dedicated Customer Zero team uses its unique position to provide a constant, high-fidelity feedback loop to product and engineering that drives continuous improvement of our products<b>. </b>And we do this at a global scale — where a single misconfiguration can propagate across our edge in seconds and lead to unintended consequences. If you've ever hesitated before pushing a change to production, sweating because you know one small mistake could lock every employee out of critical application or take down a production service, you know the feeling. The risk of unintended consequences is real, and it keeps us up at night.</p><p>This presents an interesting challenge: How do we ensure hundreds of internal production Cloudflare accounts are secured consistently while minimizing human error?</p><p>While the Cloudflare dashboard is excellent for <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a> and analytics, manually clicking through hundreds of accounts to ensure security settings are identical is a recipe for mistakes. To keep our sanity and our security intact, we stopped treating our configurations as manual point-and-click tasks and started treating them like code. We adopted “shift left” principles to move security checks to the earliest stages of development. </p><p>This wasn't an abstract corporate goal for us. It was a survival mechanism to catch errors before they caused an incident, and it required a fundamental change in our governance architecture.</p>
    <div>
      <h2>What Shift Left means to us</h2>
      <a href="#what-shift-left-means-to-us">
        
      </a>
    </div>
    <p>"Shifting left" refers to moving validation steps earlier in the software development lifecycle (SDLC). In practice, this means integrating testing, security audits, and policy compliance checks directly into the <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">continuous integration and continuous deployment (CI/CD) pipeline</a>. By catching issues or misconfigurations at the merge request stage, we identify issues when the cost of remediation is lowest, rather than discovering them after deployment.</p><p>When we think about applying shift left principles at Cloudflare, four key principles stand out:</p><ul><li><p><b>Consistency</b>: Configurations must be easily copied and reused across accounts.</p></li><li><p><b>Scalability</b>: Large changes can be applied rapidly across multiple accounts.</p></li><li><p><b>Observability</b>: Configurations must be auditable by anyone for current state, accuracy, and security.</p></li><li><p><b>Governance</b>: Guardrails must be proactive — enforced before deployment to avoid incidents.</p></li></ul>
    <div>
      <h2>A production IaC operating model</h2>
      <a href="#a-production-iac-operating-model">
        
      </a>
    </div>
    <p>To support this model, we transitioned all production accounts to being managed with Infrastructure as Code (IaC). Every modification is tracked, tied to a user, commit, and an internal ticket. Teams still use the dashboard for analytics and insights, but critical production changes are all done in code.</p><p>This model ensures every change is peer-reviewed, and policies, though set by the security team, are implemented by the owning engineering teams themselves.</p><p>This setup is grounded in two major technologies: <a href="https://developer.hashicorp.com/terraform"><u>Terraform</u></a> and a custom CI/CD pipeline.</p>
    <div>
      <h2>Our enterprise IaC stack</h2>
      <a href="#our-enterprise-iac-stack">
        
      </a>
    </div>
    <p>We chose Terraform for its mature open-source ecosystem, strong community support, and deep integration with Policy as Code tooling. Furthermore, using the <a href="https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs"><u>Cloudflare Terraform Provider</u></a> internally allows us to actively <a href="https://blog.cloudflare.com/tag/dogfooding/"><u>dogfood</u></a> the experience and improve it for our customers.</p><p>To manage the scale of hundreds of accounts and around 30 merge requests per day, our CI/CD pipeline runs on <a href="https://www.runatlantis.io/"><u>Atlantis</u></a>, integrated with <a href="https://about.gitlab.com/"><u>GitLab</u></a>. We also use a custom go program, tfstate-butler, that acts as a broker to securely store state files.</p><p>tfstate-butler operates as an HTTP backend for Terraform. The primary design driver was security: It ensures unique encryption keys per state file to limit the blast radius of any potential compromise. </p><p>All internal account configurations are defined in a centralized <a href="https://developers.cloudflare.com/pages/configuration/monorepos/"><u>monorepo</u></a>. Individual teams own and deploy their specific configurations and are the designated code owners for their sections of this centralized repository, ensuring accountability. To read more about this configuration, check out <a href="https://blog.cloudflare.com/terraforming-cloudflare-at-cloudflare/"><u>How Cloudflare uses Terraform to manage Cloudflare</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/17DDCeUrkEeWqtqpIPZoV4/114b63e0b8c408843b14c447ed27ed97/image1.png" />
          </figure><p><sup>Infrastructure as Code Data Flow Diagram</sup></p>
    <div>
      <h2>Baselines and Policy as Code</h2>
      <a href="#baselines-and-policy-as-code">
        
      </a>
    </div>
    <p>The entire shift left strategy hinges on establishing a strong security baseline for all internal production Cloudflare accounts. The baseline is a collection of security policies that are defined in code (Policy as Code). This baseline is not merely a set of guidelines but rather a required security configuration we enforce across the platform — e.g., maximum session length, required logs, specific WAF configurations, etc. </p><p>This setup is where policy enforcement shifts from manual audits to automated gates. We use the <a href="https://www.openpolicyagent.org/"><u>Open Policy Agent (OPA)</u></a> framework and its policy language, <a href="https://www.openpolicyagent.org/docs/policy-language#what-is-rego"><u>Rego</u></a>, via the Atlantis Conftest Policy Checking feature.</p>
    <div>
      <h2>Defining policies as code</h2>
      <a href="#defining-policies-as-code">
        
      </a>
    </div>
    <p>Rego policies define the specific security requirements that make up the baseline for all Cloudflare provider resources. We currently maintain approximately 50 policies.</p><p>For example, here is a Rego policy that validates only @cloudflare.com emails are allowed to be used in an access policy: </p>
            <pre><code># validate no use of non-cloudflare email
warn contains reason if {
    r := tfplan.resource_changes[_]
    r.mode == "managed"
    r.type == "cloudflare_access_policy"

    include := r.change.after.include[_]
    email_address := include.email[_]
    not endswith(email_address, "@cloudflare.com")

    reason := sprintf("%-40s :: only @cloudflare.com emails are allowed", [r.address])
}
warn contains reason if {
    r := tfplan.resource_changes[_]
    r.mode == "managed"
    r.type == "cloudflare_access_policy"

    require := r.change.after.require[_]
    email_address := require.email[_]
    not endswith(email_address, "@cloudflare.com")

    reason := sprintf("%-40s :: only @cloudflare.com emails are allowed", [r.address])
}</code></pre>
            
    <div>
      <h2>Enforcing the baseline</h2>
      <a href="#enforcing-the-baseline">
        
      </a>
    </div>
    <p>The policy check runs on every merge request (MR), ensuring configurations are compliant <i>before</i> deployment. Policy check output is shown directly in the GitLab MR comment thread. </p><p>Policy enforcement operates in two modes:</p><ol><li><p><b>Warning:</b> Leaves a comment on the MR, but allows the merge.</p></li><li><p><b>Deny:</b> Blocks the deployment outright.</p></li></ol><p>If the policy check determines the configuration being applied in the MR deviates from the baseline, the output will return which resources are out of compliance.</p><p>The example below shows an output from a policy check identifying 3 discrepancies in a merge request:</p>
            <pre><code>WARN - cloudflare_zero_trust_access_application.app_saas_xxx :: "session_duration" must be less than or equal to 10h

WARN - cloudflare_zero_trust_access_application.app_saas_xxx_pay_per_crawl :: "session_duration" must be less than or equal to 10h

WARN - cloudflare_zero_trust_access_application.app_saas_ms :: you must have at least one require statement of auth_method = "swk"

41 tests, 38 passed, 3 warnings, 0 failures, 0 exception</code></pre>
            
    <div>
      <h2>Handling policy exceptions</h2>
      <a href="#handling-policy-exceptions">
        
      </a>
    </div>
    <p>We understand that exceptions are necessary, but they must be managed with the same rigor as the policy itself. When a team requires an exception, they submit a request via Jira.</p><p>Once approved by the Customer Zero team, the exception is formalized by submitting a pull request to the central exceptions.rego repository. Exceptions can be made at various levels:</p><ul><li><p><b>Account:</b> Exclude account_x from policy_y.</p></li><li><p><b>Resource Category</b>: Exclude all resource_a’s in account_x from policy_y.</p></li><li><p><b>Specific Resource: </b>Exclude resource_a_1 in account_x from policy_y.</p></li></ul><p>This example shows a session length exception for five specific applications under two separate Cloudflare accounts: </p>
            <pre><code>{  
    "exception_type": "session_length",
    "exceptions": [
        {
            "account_id": "1xxxx",
              "tf_addresses": [
                "cloudflare_access_application.app_identity_access_denied",
                "cloudflare_access_application.enforcing_ext_auth_worker_bypass",
                "cloudflare_access_application.enforcing_ext_auth_worker_bypass_dev",
            ],
        },
        {
            "account_id": "2xxxx",
              "tf_addresses": [
                "cloudflare_access_application.extra_wildcard_application",
                "cloudflare_access_application.wildcard",
            ],
        },
    ],
}</code></pre>
            
    <div>
      <h2>Challenges and lessons learned</h2>
      <a href="#challenges-and-lessons-learned">
        
      </a>
    </div>
    <p>Our journey wasn't without obstacles. We had years of clickops (manual changes made directly in the dashboard) scattered across hundreds of accounts. Trying to import the existing chaos into a strict infrastructure as code system felt like trying to change the tires on a moving car. To this day, importing resources continues to be an ongoing process.</p><p>We also ran into limitations of our own tools. We found edge cases in the Cloudflare Terraform provider that only appear when you try to manage infrastructure at this scale. These weren't just minor speed bumps. They were hard lessons on the necessity of eating our own dogfood, so we could build even better solutions.</p><p>That friction clarified exactly what we were up against, leading us to three hard-earned lessons.</p>
    <div>
      <h2>Lesson 1: high barriers to entry stall adoption </h2>
      <a href="#lesson-1-high-barriers-to-entry-stall-adoption">
        
      </a>
    </div>
    <p>The first hurdle for any large-scale IaC rollout is onboarding existing, manually configured resources. We gave teams two options: manually creating Terraform resources and import blocks, or using <a href="https://github.com/cloudflare/cf-terraforming"><u>cf-terraforming</u></a>.</p><p>We quickly discovered that Terraform fluency varies across teams, and the learning curve for manually importing existing resources proved to be much steeper than we anticipated.</p><p>Luckily the cf-terraforming command-line utility uses the Cloudflare API to automatically generate the necessary Terraform code and import statements, significantly accelerating the migration process. </p><p>We also formed an internal community where experienced engineers could guide teams through the nuances of the provider and help unblock complex imports.</p>
    <div>
      <h2>Lesson 2: drift happens </h2>
      <a href="#lesson-2-drift-happens">
        
      </a>
    </div>
    <p>We also had to tackle configuration drift, which occurs when the IaC process is bypassed to expedite urgent changes. While making edits directly in the dashboard is faster during an incident, it leaves the Terraform state out of sync with reality.</p><p>We implemented a custom drift detection service that constantly compares the state defined by Terraform with the actual deployed state via the Cloudflare API. When drift is detected, an automated system creates an internal ticket and assigns it to the owning team with varying Service Level Agreements (SLAs) for remediation. </p>
    <div>
      <h2>Lesson 3: automation is key</h2>
      <a href="#lesson-3-automation-is-key">
        
      </a>
    </div>
    <p>Cloudflare innovates quickly, so our set of products and APIs is ever-growing. Unfortunately, that meant that our Terraform provider was often behind in terms of feature parity with the product. </p><p>We solved that issue with the release of our <a href="https://blog.cloudflare.com/automatically-generating-cloudflares-terraform-provider/"><u>v5 provider</u></a>, which automatically generates the Terraform provider based on the OpenAPI specification. This transition wasn’t without bumps as we hardened our approach to code generation, but this approach ensures that the API and Terraform stay in sync, reducing the chance of capability drift. </p>
    <div>
      <h2>The core lesson: proactive &gt; reactive</h2>
      <a href="#the-core-lesson-proactive-reactive">
        
      </a>
    </div>
    <p>By centralizing our security baselines, mandating peer reviews, and enforcing policies before any change hits production, we minimize the possibility of configuration errors, accidental deletions, or policy violations. The architecture not only helps to prevent manual mistakes, but actually increases engineering velocity because teams are confident their changes are compliant. </p><p>The key lesson from our work with Customer Zero is this: While the Cloudflare dashboard is excellent for day-to-day operations, achieving enterprise-level scale and consistent governance requires a different approach. When you treat your Cloudflare configurations as living code, you can scale securely and confidently. </p><p>Have thoughts on Infrastructure as Code? Keep the conversation going and share your experiences over at <a href="http://community.cloudflare.com"><u>community.cloudflare.com</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Infrastructure as Code]]></category>
            <category><![CDATA[Customer Zero]]></category>
            <category><![CDATA[Terraform]]></category>
            <category><![CDATA[Dogfooding]]></category>
            <guid isPermaLink="false">6Kx2Ob32avdygaasok3ZCr</guid>
            <dc:creator>Chase Catelli</dc:creator>
            <dc:creator>Ryan Pesek</dc:creator>
            <dc:creator>Derek Pitts</dc:creator>
        </item>
    </channel>
</rss>