Skip to content
View original post on X: meng shao
Published
Pick

Shopify’s Cyber Chaos Monkey uses AI agents for controlled production security testing

AIMeng Shao summarizes Shopify’s Cyber Chaos Monkey, an internal system that gives AI agents source code, infrastructure knowledge, and test-store credentials to probe production systems for vulnerabilities. Shopify says the agents have run tens of thousands of tests and found dozens of impactful issues, with no outages or security incidents.

AIWhy it matters.

The account explains how Shopify combines production testing with a separate monitoring agent and layered safeguards to limit security risks.

meng shaoVerified on X
@shao__meng
View on X

Shopify unveils Cyber Chaos Monkey: Letting AI agents with internal knowledge conduct controlled attacks in production, then sending a second agent in as a judge

This article, “Cyber Chaos Monkey: Staying ahead of security threats with AI agents,” published by @ShopifyEng, introduces an internal system called Cyber Chaos Monkey (CCM). It gives AI agents knowledge of attack and defense techniques, source code, infrastructure, and credentials for real test stores, then lets them look for new ways to bypass defenses in production.

The name pays tribute to Netflix’s Chaos Monkey, launched in 2011. The idea is to apply chaos engineering—deliberately causing failures to test system resilience—to security. On July 29, Zack Deveau published an article about finding and fixing vulnerabilities during coding and testing; CCM moves vulnerability hunting online.
https://shopify.engineering/cyber-chaos-monkey

Why test in production?

Shopify believes that frontier models are making it cheaper to find vulnerabilities, and that vulnerability reports are surging across the industry. Shopify says reports to its bug bounty program have increased by nearly 300% since 2024.

Their view is that the same models can also help defenders. Shopify knows its own systems better than outside researchers do, so it should find the highest-impact issues first, making it harder for outsiders to uncover vulnerabilities. Attackers target production, so testing must target production too—with the proviso that service availability cannot be affected and merchant data cannot be put at risk.

Set the direction first, then act

CCM’s role is like that of a bug bounty researcher. It has access to source code, threat intelligence, historical vulnerability reports, and deployment records, and can use real test stores to call live APIs. The system has two parts: a discovery module and a sandbox. Tasks can come from security engineers, other upstream security agents, or feedback from the discovery module itself.

An idea first goes to the discovery module, where the latest attack-and-defense models narrow down the scope. Promising leads are then handed to the sandbox. Agents in the sandbox try to exploit vulnerabilities. Shopify’s preferred approach is to send real requests to live systems, then iteratively adjust based on production logs and source code. When testing ends, a report is sent back to the discovery module, potentially prompting new tasks.

Isolation alone isn’t enough; someone has to keep watch

The article notes that AI agents have recently touched systems they shouldn’t have accessed during security testing, so safety constraints must be built in from the start.

There are several layers of isolation:
· Each task gets its own Kubernetes Job.
· Attack agents run in unprivileged containers and can access only temporary credentials written by the orchestrator, such as session cookies and CSRF tokens.
· Outbound requests first pass through a credential proxy that injects keys, then through an egress allowlist that permits only production domains, internal knowledge services, model providers, and designated package proxies.

Each agent also has a set of rules: it can try its best to attack the target, but once it succeeds, it must not move on to attack other systems or retain access.

Shopify doesn’t trust the agent carrying out the attack on its own. It also uses a “judge” agent, with a different prompt, perspective, and model, to read the executor’s logs in real time. The task is terminated immediately if dangerous behavior is detected; it also ends if the judge times out, crashes, or can’t reach a decision. The orchestrator and both agents maintain heartbeats, and if any one of them exits, the entire Pod is destroyed.

According to Shopify, these agents have already carried out tens of thousands of attack tasks, finding and addressing dozens of issues with real-world impact, without causing downtime or security incidents.

AITranslated from Chinese
Shopify Engineering@ShopifyEng
Tens of thousands of offensive engagements, dozens of impactful security findings, no outages or incidents caused so far. Meet Shopify’s Cyber Chaos Monkey 🐒, our agentic vulnerability hunter. https://shopify.engineering/cyber-chaos-monkey
View quoted post on X
Source details

meng shao · x.comPublished

Original title: Shopify 公开 Cyber Chaos Monkey:让带着内部知识的 AI Agent 在生产环境做受控攻击,再派第二个 Agent 当裁判