# Dragos planted fake keys in two million AI prompts. Someone's still trying them.

Agent security · 19 November 2026

Starting in July, Dragos sent roughly two million prompts to popular AI
services. Each one carried some bait: a URL that existed nowhere else, and a set
of credentials that didn't unlock anything real. If those prompts had stayed
between the sender and the model, nobody would ever have touched either one.

The first hits came within days. The tokens planted in July are still going off
now, in November.

[Dragos's write-up](https://www.dragos.com/blog/ai-supply-chain-security-canary-tokens)
is worth reading in full. The short version is that a prompt doesn't stay with
the model you sent it to.

## What turned up

One AI lab's systems fetched the hidden URLs from more than half of the prompts
Dragos sent its models between July and October. That included about two thirds
of the requests explicitly marked "no data collection" or Zero Data Retention.

Several US hosting providers resell that lab's models. Prompts sent through
those providers set off the same scraper, which suggests they were finding their
way back to the lab through the reseller.

On one inference marketplace, resellers could read and keep customers' prompts
using nothing more than the platform's normal request logging. Nobody had to
exploit anything to get them.

And the activity pointed to data from at least three AI providers being exposed,
with some of the planted credentials tried against canary AWS accounts Dragos was
watching.

So between you and the model there can be a provider, a reseller or router in
front of that provider, logging at every hop, and whoever manages to break into
any of them. Zero Data Retention is a promise one company in that chain makes
about its own storage. It says nothing about anyone else in the chain, and in
Dragos's data it didn't always hold for the company making it.

## How keys end up in prompts

Few people paste their AWS keys into a chat window on purpose (some do). With
agents, it happens without anyone deciding to.

A coding agent debugging a failed deploy runs `cat .env` to check one variable.
A test fails and the stack trace includes the whole `DATABASE_URL`, password and
all. An API rejects a request and quotes the key back in its error body, which
Stripe does. Someone asks the agent why a tool can't find its config and it runs
`printenv`. Whatever a tool prints lands in the context window, and the context
window is the prompt.

It doesn't go out once, either. Agents resend the conversation on every turn, so
a key that showed up on turn four gets shipped to the provider again on turns
five through fifty. Every one of those requests travels the same path Dragos was
measuring.

## Secret filtering helps, up to a point

Dragos recommends turning on secret filtering where your provider offers it, and
you should. These filters look for well-known credential shapes, like `AKIA…`
for AWS or `sk-…` for OpenAI, and scrub them from prompt data.

There are two catches. A pattern only matches keys that look like keys: your
Postgres password, an internal service's bearer token, or a webhook signing
secret is just a random string to a filter. And the filter runs on the
provider's side, after the prompt has already left your machine and passed
through any reseller sitting in front.

The more reliable fix happens before the prompt is sent: make sure that whatever
ends up in it is worthless to whoever reads it.

## What seekrit does about it

### Give the agent a placeholder instead of a key

[`seekrit-proxy`](/docs/guides/agent-proxy) sits between your agent and the APIs
it calls. The agent is configured with a placeholder like
`{{seekrit:ANTHROPIC_API_KEY}}`, and the proxy swaps in the real value only on
the outbound request to a host you've allowlisted.

```sh
export SEEKRIT_TOKEN=skt_…
npx -y @seekrit/cli proxy run --preset anthropic --preset openai
```

Then point the agent at it:

```sh
export ANTHROPIC_BASE_URL=http://127.0.0.1:8080/anthropic
export ANTHROPIC_API_KEY='{{seekrit:ANTHROPIC_API_KEY}}'
```

Now when the agent runs `printenv`, it prints the placeholder. When a test dumps
its config, it dumps the placeholder. If the transcript turns up in a reseller's
logs or a breached bucket, what's in it is a string that only means something to
your own proxy. That includes the model key itself, which for most agent setups
is the credential most likely to be sitting in the environment.

The proxy also deals with the error-message problem. It scans responses for the
exact values it injected and replaces them before the agent sees them, so an
error like Stripe's comes back as `Invalid API Key provided: [redacted by seekrit]`.
This is different from provider-side filtering in a useful way: the proxy isn't
guessing what a key looks like, because it knows exactly which values it put on
the wire. The catch is that it only knows those. A key the agent finds in
some other file on disk is outside what it can catch.

One requirement: the proxy has to run somewhere the agent can't reach. If the
agent can read the proxy's `SEEKRIT_TOKEN` or its config, you've moved the key
rather than hidden it.

### Don't hand values to the agent through tools

The same applies to the tools you give an agent. In seekrit's
[local MCP server](/docs/mcp), `get_secret` only reports whether a secret exists
and which version it's on, unless the agent explicitly asks for `reveal: true`.
The server's instructions steer the agent to `run_command` instead, which starts
a process with the secrets injected and returns the exit code and output rather
than the values. The hosted MCP server at `mcp.seekrit.dev` doesn't return a
secret value at all.

The caveat is that `run_command` returns whatever the command printed. Ask it to
run `printenv` and the values go straight back into the transcript.

### Make leaked credentials expire

The line from Dragos's post that's hard to shake is that the July tokens are
still firing. A static key that leaks in a prompt stays good until someone
notices and rotates it, and for a lot of teams that means never.

seekrit can mint [short-lived credentials](/docs/concepts/temporary-access)
instead. An [AWS lease](/docs/guides/dynamic-aws) is an STS session that expires
on its own:

```sh
eval "$(seekrit aws lease prod-deploy --ttl 1h)"
```

For model access, an [OpenRouter lease](/docs/guides/dynamic-openrouter) creates a
fresh key with its own spending cap and expiry, and deletes it when the lease
ends:

```sh
seekrit dynamic lease agent-models --ttl 30m
```

If a key leased for thirty minutes in July shows up in someone's logs in
September, it has been dead for two months, and it never could have spent more
than the cap you set.

### Run your own version of the experiment

Dragos's method was canaries: put something in the prompt that nobody
legitimate would ever use, and watch who uses it. You can point the same idea at
your own agents with a seekrit [honey token](/docs/guides/honey-tokens).

A honey token looks exactly like a real `skt_` service token and unlocks
nothing. When anyone presents one, seekrit rejects the request with the same
`401` an unknown token gets, writes a `honey_token.tripped` row to your audit log
with the source IP and user agent, and emails your admins.

```sh
seekrit honey-token create \
  --name agent-context-bait \
  --placement "fixtures/legacy.env in acme/api, read by coding agents"
```

Put it somewhere your agents will read and nothing will ever load: an old
fixture file, a doc in a repo they index, a commented-out line in a config. It
rides along in prompts with everything else. If it trips, check the IP in the
audit row. Your own CI runner means one of your agents got curious and tried it,
which is worth knowing in itself. An address you've never seen means a
transcript went somewhere and someone acted on what was in it.

It only fires when someone tries the token against seekrit, so it won't tell you
about your OpenAI key being tested against OpenAI. What it can tell you is
whether a particular stream of prompts was read by someone who shouldn't have
it, which is the question Dragos needed two million prompts to answer. We wrote
more about this side of it in
[Attackers test every key they steal](/blog/attackers-test-stolen-keys).

## What this doesn't fix

Credentials are the easy part of a prompt to protect, because they can be swapped
for something meaningless. Most of a prompt can't be. The source code your agent
is editing, the customer record it's summarizing, the incident notes it's
reading: all of that reached the same scrapers Dragos caught, and no secrets
manager changes that. Deciding which providers get to see what is a separate
problem, and Dragos's post covers it better than we can.

Honey tokens are detection. By the time one trips, the read has already
happened.

## Where to start

Find out where your agents' model keys live. If the answer is "in the agent's
environment," that key is one `printenv` away from every prompt the agent sends.
Put it behind the proxy, rotate it, and plant a honey token where the old one
used to be.
