Zero data retention was a checkbox, and nobody checked it
7m read time

Zero data retention was a checkbox, and nobody checked it

Dragos fed nearly two million prompts full of fake credentials to AI services and watched where they surfaced. Three providers turned out to be breached, resellers were reading along, and a link from a prompt flagged ZDR turned up 24 days later in a company chat. What that means for the context your coding agent sends.

Together AI kept a sample of customer prompts to test its software against. They sat in a private Hugging Face repository, out of public view. Then an AI coding agent committed the credential for that repository to a public GitHub repo.

Someone picked it up, downloaded the prompts and searched them for passwords and keys to other services. Then they tested which ones still worked. Five of them were fake: canary credentials from a Dragos research project.

The prompts were kept for testing. They certainly got tested.

A prompt goes from agent through router and reseller to provider, and the ZDR flag covers only the first hop.

What Dragos did ​

HD Moore, who created Metasploit and now runs research at Dragos, sent nearly two million prompts to AI services between July and November. Every prompt carried something that existed nowhere else: a URL, a hostname, an AWS key tied to an empty account with full logging. Anyone who ever uses one of those tokens has seen the prompt. Then he waited.

The waiting turned up three things.

  • Three providers were breached and did not know it. Attackers were copying requests at three different hosting companies. The largest breach covered a couple of hundred of Dragos's AWS keys, including requests the provider rejected before any model ran, so the copying happened at the front door. In the other two breaches, some of the stolen requests carried the ZDR flag.
  • Resellers read along without hacking anything. On an inference marketplace, a seller listed a popular model at the lowest price, turned on request logging and waited. A day and a half after two prompts went through, someone on a home broadband line was guessing usernames at the secret URL's login page.
  • Privacy settings were ignored. A Chinese AI lab fetched the secret URLs from more than half of the prompts sent to its models between July and October, including roughly two-thirds of the requests marked "no data collection" or ZDR. US providers reselling that lab's models triggered the same scraper.

Then there is the example that sticks. A prompt went out with the ZDR flag set. Twenty-four days later the secret link from it was posted in a Feishu chat, and within two minutes three desktops and three phones in Beijing and Shanghai had opened it. Moore, drily: "Zero Data Retention is supposed to mean something."

The collaboration, at least, was excellent.

The router did its job ​

Routers are useful and will stay useful. One endpoint, one invoice, switching models without another account, and the cheapest seller gets your request. That last part is also the problem.

OpenRouter responded yesterday the way you would want a vendor to respond. Three providers removed, 125 endpoints taken off zero data retention eligibility, affected customers notified. It is also adapting the Dragos method, so it can run those checks itself from now on.

Not every provider waited for the researchers to go public. Phala published a preliminary incident report on 10 November: requests OpenRouter routed to its DeepSeek endpoint between 21 October and 8 November should be treated as exposed. The model ran on a new GPU server serving production traffic without full hardening. Whoever let the router pick probably never chose Phala.

A flag only binds the first hop ​

You set the ZDR flag at your router. The router passes it to the next party, and from there it is a promise nobody could check. Dragos traced around two thousand routes and found a system it could not identify in several hundred of them. One router was quietly forwarding some of its traffic to the marketplace, and one seller was silently adding about a thousand tokens to every prompt.

Every hop sees the whole prompt and the whole response. The flag you set changes nothing about what a compromised server sees, or what a reseller logs. Moore puts it in one sentence: "Keep in mind that a privacy flag only binds the first hop, and that AI agents will happily send whatever they can read, including credentials."

The second half of that sentence is what this post is about.

Your coding agent sends whatever it reads ​

You type a chat prompt yourself. A coding agent assembles its own context: the files it opened, the output of the commands it ran, the stack trace with the connection string in it. A .env it read to understand a bug goes along just like your question. A wire capture of the Grok Build CLI already showed how far that can go.

Dragos saw what happens to a credential that ends up in a prompt that way. Stolen AWS keys were sometimes tested within a few hours. The attacker then went through S3, Secrets Manager and Parameter Store, tried to enable Bedrock models and created IAM users of their own to keep access. In total, the bait keys drew tens of thousands of AWS API calls.

And the Together leak itself started with a coding agent committing a credential. The agent leaked the key to the stored prompts.

I put out my own bait ​

Today I ran the same idea on a small scale. A throwaway project with a failing test, a config loader with a bug, and a .env holding a fake AWS key and a canary URL from canarytokens.org. You can only fix the bug by looking at what is in .env. Two free coding agents got the same prompt: opencode with a free model through OpenCode Zen, and freebuff.

Both read .env and sent its contents along. opencode ran cat .env sixteen seconds into the session. freebuff included .env in the first batch of files it asked for. Both fixed the bug cleanly, which is the point: neither did anything wrong.

freebuff's local session does not even record which model did the work, only an encrypted ID. So I cannot tell who received my key.

A third set of tokens only ever went through a Claude Code session, as a control group.

Now I wait. Dragos saw tokens fire within hours and a link surface after 24 days, so this runs at least that long. When the experiment concludes I will write a follow-up, even if nothing fires.

What you can actually do ​

You can keep using AI services. Moore's point is that where your prompts go is a decision, and if you do not make it, the lowest price makes it for you.

  • Send code to a first-tier provider. One company, one contract, one privacy policy to read. Things can still leak there, but it is, in Moore's words, "the smallest exposure you can buy." Your employer's source code does not belong in the cheapest pool.
  • Pick your upstreams at the router. Do not accept the default pool. Pin which providers may receive your requests and stay away from reseller marketplaces: Dragos says some of that capacity runs on stolen keys.
  • Plant your own canary. Put a fake credential in the context your agent already sends, for example a free Canarytoken AWS key in a test project's .env. If it ever fires, treat it as an incident, and you will know more than your provider can tell you.
  • Keep real secrets out of the context. What the agent cannot read, it cannot send. Credential masking in the sandbox gives your agent's shell a placeholder instead of your token.

That last one is the only point fully under your control. The rest depends on parties you cannot inspect.

Three providers did not know they were breached. Most of their customers had no way of knowing which hops their prompts passed through. The only party that knew exactly where the prompts ended up was the one who had put bait in them.

(12 of 12)