The goal was a Bedrock key
On December 2, Perplexity described an autonomous attacker that spent two weeks probing its systems for AWS keys able to call frontier models on Amazon Bedrock. The operator wrote one goal; coding agents in a Kali container turned it into hundreds of tasks that mined git history, Gists, npm and PyPI releases, container layers and JavaScript bundles, and tested every complete key they found. Perplexity held. Two other companies didn't. In Bromure Agentic Coding, every key an agent can write into those places is a stand-in that fails the attacker's check.

An AWS access key ID had to appear alongside its 40-character secret.
On December 2, Perplexity published an account of an attack that no person typed out step by step. An operator gave an agent harness one goal: get AWS keys or Bedrock tokens that can invoke two specific frontier models, with broad IAM permissions, in every Bedrock region. The harness did the rest for about two weeks.
Perplexity's own controls held. The attacker left with nothing. But the attacker's staging server was open to the internet, and on it Perplexity found two more campaign workspaces, against two companies it doesn't name. Both were breached.
Two weeks against Perplexity
The first disposable accounts appeared between October 24 and 28, running low-volume reconnaissance. On November 2 the sweeps started: about 48,000 requests in 13 minutes across roughly 28,000 guessed API routes, above 200 requests per second. Perplexity Computer, the company's own agent platform, raised the alert.
What the attacker tried:
- SSRF. It pushed link-fetching features toward cloud metadata at
169.254.169.254and toward internal services, then cycled through decimal and hex IP rewrites, malformed URLs, redirect chains and DNS-rebinding domains when the direct route failed. - Bucket guessing. About 3,681 S3 lookups over 14 hours, more than
3,300 unique keys, looking for files like
.env.productionand.aws/credentials. - Permissions. Route discovery, privilege escalation and cross-tenant requests.
- Rotation. About 40 disposable-email accounts and roughly 290 residential and cloud proxies, so no single account showed the whole campaign.
Perplexity refused every attempt. Its outbound validator resolves each hostname and checks the IP at connection time, which beat the rebinding tricks. On November 4, attacker callbacks led Perplexity to one external server with 207 open ports. Twenty-nine served unauthenticated directory listings: more than 10,000 files, including probing scripts, logs and the working folders for the two other campaigns. Perplexity notified both companies that day. Probing stopped on November 8.
How the hunt worked
The harness is Cairn, an open-source agent framework. A campaign is a
graph of facts and intents around the operator's goal, stored in a
graph.yaml. Per Perplexity, "Cairn ran its workers as CLI coding
agents inside a Kali Linux container," with shell, network and
headless-browser access: the same kind of tool you run every day.
In the one fully preserved graph, the worker created 276 tasks on its own over 19.5 hours, with up to 14 running in parallel. It marked 37 conclusions as dead ends, and later tasks went back to 19 of them, a median of 31 minutes later. When an authenticated GitHub code search failed, it opened three parallel tasks within 25 minutes and returned to the search once one of them found a token.
The places it looked for keys:
- Git history.
git log -p --all,git cat-file --batch-all-objectsfor unreachable objects, and Gists. One task queued 4,328 forks of ten public repositories for full-history scanning and finished 4,281 of them. - Public code search, through
grep.app, with blocked pages fetched through a proxy service. - Published artifacts. Unpacked npm and PyPI releases, OCI container layers, Hugging Face repositories, and strings from desktop installers and iOS and Android builds.
- The web. JavaScript bundles, OpenAPI schemas, web archives, certificate-transparency and passive-DNS feeds.
Then it checked what it found. It only tested complete credentials:
"An AWS access key ID had to appear alongside its 40-character
secret," and the agent confirmed each pair with
sts:GetCallerIdentity or the vendor's API. A key that passed went
into the graph as a fact, and the next tasks built on it.
What it found elsewhere
Company A. The agent found a live customer OAuth credential in deleted git history. With it, it took administrative control of that customer's workspace and ran code on managed compute. From there it reached internal endpoints behind IP allowlists, captured a stored Git token and obtained short-lived AWS workload credentials. Those lacked Bedrock permissions, so the goal wasn't met.
Company B. The agent logged into an exposed management API on a demo environment and installed a persistent command runner, which called back about 1,000 times in 15 hours. It collected local password stores, Kubernetes secrets and EC2 instance-role credentials. The company's Bedrock proxy refused its model calls.
Neither intrusion reached the models. Both handed an unknown operator admin access, internal reach and cloud credentials along the way. Perplexity's write-up summarizes the pattern as "one operator prompt, hundreds of self-directed tasks, and probing that adapts every time a request fails."
Every place it looked, an agent writes to
Read the hunt list again with your own coding agent in mind. A
commit, a .env.production, an npm or PyPI release, a container
image, a production JavaScript bundle, a Gist with a quick repro.
Coding agents produce all of these, many times a day, often in sessions
where the key the code needs is sitting in an environment variable or
a dotfile the agent can read.
Removing a key in the next commit doesn't remove it. We wrote about
that in October, when GhostAction
ran git log -p --all from a stolen workflow
across thousands of repositories. Cairn goes further. It pulls
unreachable objects, scans thousands of forks that kept the old
history, opens the published tarballs and image layers, and runs the
whole search again when a dead end looks worth a second try. It does
this around the clock, through 290 proxies.
The agent ignored strings that looked like keys. It kept a string only after a live API accepted it, and a stand-in fails that test.
The same hunt against a Bromure machine
Bromure Agentic Coding runs Claude Code, Codex, Grok, Kimi and omp in Ubuntu VMs on your Mac. The real credentials stay encrypted on the Mac, and the VM gets stand-ins in their place. A proxy on the Mac swaps each stand-in for the real value only when a request leaves for the host that credential belongs to. Run Cairn's sources against a Bromure machine and they turn up the following.
The keys in the VM are stand-ins
When a machine boots, the app writes stand-ins into the environment
variables and config files the tools expect: ANTHROPIC_API_KEY,
GH_TOKEN, ~/.git-credentials, ~/.docker/config.json,
~/.kube/config, ~/.aws/config, MCP configs. Each one keeps the
shape validators look for. An Anthropic key reads
sk-ant-api03-brm-…, a GitHub token is ghp_ and 36 characters, a
Bedrock API key is bedrock-brm-…, a Kubernetes token is
brm-k8s-….
Your project's own .env goes the same way. Import env file…
reads it on the Mac and turns each variable into a credential: known
names like AWS_ACCESS_KEY_ID, GITHUB_TOKEN or OPENAI_API_KEY map
to their type, and anything else, STRIPE_KEY for example, becomes a
token scoped to the hosts you list. The VM sees brm_… under the same
variable name.
So when the agent writes a .env.production, hard-codes a key into a
test, bakes it into a Docker layer or inlines it into a bundle through
a VITE_ variable, the value it writes is the stand-in. Commit it,
delete it a commit later, let 4,328 forks copy the history: the
string a scanner pulls out opens nothing.
The AWS pair fails the check
AWS gets the deepest treatment. Inside the VM, ~/.aws/config points
at a helper that hands every SDK, the aws CLI, terraform and boto3
the real access key ID paired with a fake 40-character secret. The
agent signs with the fake. On the Mac, the proxy strips that signature
and signs again with the real secret, for *.amazonaws.com hosts alone.
The real secret never exists in the VM in any form.
Cairn's filter wants a key ID next to a 40-character secret. If an
agent ever dumps the pair into a file and it ends up public, it
matches that filter. Then the worker runs
sts:GetCallerIdentity from its Kali container, AWS checks a
signature made with the fake secret, and refuses it. The credential
never becomes a fact in the graph, and nothing downstream gets built
on it.
Bedrock follows the same path. A Bromure machine reaches Bedrock
through its own AWS credentials and the same re-signing proxy, or
through a Bedrock API key the VM only sees as bedrock-brm-…. The
models the operator was after stay out of reach.
A stand-in sent the wrong way pauses the VM
Each stand-in is unique to one credential, derived from the real value with HKDF-SHA256 and a per-install salt. That makes it a tripwire. The proxy scans every outbound request, headers and body, for a stand-in headed outside its scope.
Say a poisoned dependency or a prompt-injected README tells your agent
to post the environment to a Gist "for debugging." The request goes to
api.github.com carrying sk-ant-api03-brm-…, and GitHub isn't
Anthropic. The proxy answers HTTP 451, forwards nothing, and pauses
the VM. The Mac shows This environment may have been compromised,
with the token preview, the credential's name, the host it was minted
for and the host it was sent to. You choose Shut down, Block,
Allow for this session, or Save for Investigation, which
exports the disk and home for a closer look.
Pushes wait for you
New machines put GitHub, GitLab, Bitbucket and container registries
under Prompt before write. Reads pass. A git push or an image
push stops for a dialog on the Mac that shows the exact operation and
target. A commit that adds .env.production doesn't reach the remote,
and an image with a baked-in config doesn't reach the registry, until
you've seen it go.
Real AWS signing is on the record
For credentials you want watched, Ask before use in the Guardrails pane holds the first use in each session for a dialog. For AWS it applies to every signing call on the Mac. Grants live in memory and end when the VM shuts down. Every successful re-sign is a Credential used row in the Security Timeline with the masked key ID, so a Bedrock call you didn't expect shows up next to the session that made it.
Nothing real to mine
Environment variables, config files and imported .env values in
the VM are stand-ins. Whatever an agent commits, publishes or bakes
into an image carries a value that opens nothing.
The pair fails the test
AWS gets the real key ID and a fake secret. A pair scraped from
history matches the attacker's filter and fails
sts:GetCallerIdentity.
Stand-ins are tripwires
A stand-in sent anywhere but its own host gets an HTTP 451. The VM pauses and the alert names the credential and both hosts.
Pushes wait for you
git push and image pushes stop for Prompt before write on
new machines, and every AWS signing call is a row in the Security
Timeline.
What to do this week
- Scan full history, unreachable objects included: run your secret
scanner over
git log -p --alland overgit cat-file --batch-all-objects, on every repository and every fork you control. Rotate anything it finds, even if the commit was reverted. - Unpack your own published npm and PyPI releases, container images and production JavaScript bundles and scan those too. Cairn did.
- Lock Bedrock down in IAM: grant
bedrock:InvokeModelonly to the roles and model ARNs that need it, and turn on model invocation logging so a stranger's calls show up. - Validate outbound fetches at connection time, after DNS resolution,
and block
169.254.169.254and private ranges. Perplexity credits this control with defeating the rebinding attempts. - Take down demo environments with exposed management APIs, or put them behind authentication.
- Keep real keys out of the machine your coding agent works on. Import
your
.envinto Bromure and let the agent work with stand-ins.
The manual covers stand-ins, AWS re-signing and the compromise alert in Credentials & the Wire Boundary, Prompt before write and Ask before use in Guardrails, and the Credential used rows in the Security Timeline.


