Together AI's coding agent leaked the key to its promptsA revert closed nothing
On November 21, 2026, Together AI said an AI coding agent had committed a credential to its public xorl repository, and someone used it to download stored samples of customer prompts. The intruder then searched those prompts for other credentials and tried them. The scanner caught the commit and the team reverted it, which did nothing about the copy already taken.
-
01
Source
Agent commit
Coding agent commits a credential to the public xorl repo
reverted after scan -
02
Channel
Private HF repo
Credential opens stored prompt samples from June and July
MiniMax, GLM, Kimi -
03
Exposure
Keys in prompts
Intruder searches prompts for credentials and tests them
five were canaries
TL;DR· the answer, in twenty seconds
What happened: An AI coding agent working on Together AI's public xorl repository committed a credential for a private Hugging Face repository. Someone used it to download stored samples of customer prompts from June and July 2026, then searched those prompts for credentials to other services and tested them.
The minimum fix: Treat any credential that reaches a public push as stolen. Revoke it at the issuer before you touch git history, and only then clean up. Put a secret scan in front of every agent commit and turn on push protection, since CI runs too late for a public branch.
The lesson: One credential exposed a dataset, and the dataset held more credentials. Keep long-lived keys out of the agent's working tree, scope each token to one resource, and stop storing raw customer prompts you have not scrubbed.
Together AI published a security notice on November 21, 2026 saying an unauthorized party had downloaded stored samples of customer prompts, after an AI coding agent committed a credential to the company's public xorl repository on GitHub. The credential opened a private Hugging Face repository where Together kept the samples for software testing. The party then searched the prompts for credentials to other services and tested whether they worked.
The chain has three links, and each one is a common setup. Coding agents commit to public repositories every day. Teams keep samples of real traffic to test against. Customers paste keys into prompts. Together's notice is short, but it shows how those three combine, and it shows that the first response Together describes, reverting the commit, did not close the hole.
What Together AI's notice says, and what it leaves out
The notice, signed by CEO and co-founder Vipul Ved Prakash, gives the sequence in a few paragraphs. Here it is in order, close to Together's wording.
- As part of routine software testing, Together collected prompt samples "authorized for that use" and stored them in a private Hugging Face repository. The samples came from serverless requests to MiniMax M3, GLM-5.2 and Kimi K2.6, most of them on June 24, July 4, July 8 and July 14, 2026.
- During development of xorl, a public GitHub repository, "an AI coding agent committed a credential that provided access to the private Hugging Face repository."
- Together's automated scanning detected the exposed credential, and the team reverted the commit.
- During the exposure window, an unauthorized party obtained the credential and downloaded the stored samples.
- The party "subsequently searched those samples for credentials to other services and tested whether those credentials were valid." Five of the credentials it tested were canary credentials from a Dragos security experiment.
Together says it worked with an external forensic firm and law enforcement, has found no evidence of prompt leakage beyond this incident, and is still reviewing the prompt contents to decide which customers need direct notice. StartupHub.ai adds that Together says it understands the data has since been deleted. That is a statement about the intruder's copy, and nobody can verify it from outside.
The notice leaves out several things you would want before drawing hard conclusions:
- Which coding agent made the commit, and whether a person reviewed it before the push.
- What kind of credential it was. Hugging Face issues read, write and fine-grained tokens, and the notice does not say which this was or what else it could reach.
- How long the exposure window lasted, in minutes or days.
- When the credential was revoked. The notice describes a revert. It does not say when the token stopped working.
- How many customers' prompts were in the samples, and which credentials the intruder found besides the five canaries.
Those gaps matter for anyone reconstructing the incident. They do not matter much for the fixes below, which hold whatever the answers turn out to be. Unite.AI and the Futurum Group both restate the notice and add no new facts about the commit.
A revert removes the line, the token stays valid
The detail to dwell on is step 3. A scanner found the credential, and the response was a revert. Then step 4 happened anyway.
git revert creates a new commit that undoes an old one. The old commit stays in history, reachable by its hash, in every clone and fork made before the revert, and on any mirror or cache that fetched the repository. On a public repository, the credential was readable from the moment the push landed. Removing it from the tip of the branch changes what a casual reader sees. It changes nothing for anyone who already has the commit.
GitHub's own guide to removing sensitive data puts this in its first section: if the data is a secret, "as a first step you need to revoke and/or rotate that secret." It goes on to say that once the secret no longer works, rewriting history "may not be warranted." The order is the point. Revocation closes the window. History rewriting is cleanup, and it comes with side effects for every collaborator and fork.
Hugging Face makes the first step easy. Its token documentation says to delete or refresh a leaked token from the Access Tokens settings page, and it documents a public endpoint that invalidates any Hugging Face token you submit, with no rights over the owning account required. The endpoint always answers 202 Accepted, so nobody can use it to test whether a token is live. The owner gets an email and needs a new token.
A runbook for the next time a scanner fires on a public push looks like this. Run it in this order, and do not let anyone start on history until step 1 is done:
# 1. Kill the credential at the issuer. For a Hugging Face token you own,
# delete or refresh it at https://huggingface.co/settings/tokens.
# For any leaked HF token, including one you found in someone else's repo:
read -rs LEAKED_HF_TOKEN # paste the value, it stays out of shell history
curl -X POST "https://huggingface.co/api/credentials/revoke" \
-H "Content-Type: application/json" \
-d "{\"credentials\": [\"${LEAKED_HF_TOKEN}\"]}"
unset LEAKED_HF_TOKEN
# 2. Check what the credential reached while it was live.
# Pull the issuer's access logs for the exposure window,
# starting at the push, not at the alert.
# 3. Look for other copies before you declare the incident closed.
gitleaks git --redact --verbose --log-opts="--all" .
# 4. Only now decide whether to rewrite history (git filter-repo),
# following GitHub's sensitive-data guide.
Step 2 is where Together's case gets expensive. A token that can read a dataset is a token someone may already have used to copy the dataset. The window to measure runs from the push to the revocation. Neither the alert nor the revert ends it.
The intruder treated the prompts as a key store
Most coverage of this incident stops at the leaked prompts. The step that should worry you more is what the intruder did next. They went through the samples looking for credentials and tried each one.
That is a sensible move. Prompts sent to an inference API carry whatever the caller put in them, and Dragos lists credentials among the sensitive data prompts often contain. A developer pastes a failing config into a chat. A coding agent includes a .env file it read as context. An application builds a prompt from a support ticket that contains a customer's token. When a provider keeps samples of that traffic for testing, it keeps those keys too, in plain text, in a dataset whose access control is one token.
The five canaries are how we know the intruder tested what they found. Dragos had been sending prompts with planted credentials to AI services since July. Its November 19 write-up describes about two million prompts with unique URLs and canary AWS keys, and evidence that data from at least three AI providers was exposed. Dragos does not name those providers. The path Together describes is different: a repository credential that opened a stored dataset. The canaries fired anyway, because they were in the prompts and the prompts were stored.
Dragos also describes what attackers did with live AWS keys pulled from prompts in the breaches it tracked: test the key, sometimes within a few hours of the original request, then list S3 buckets, search Secrets Manager and Parameter Store, try to enable Bedrock models, and add IAM users to keep access. Nothing in Together's notice says its intruder went that far. The Dragos timeline shows what a key found in a prompt is worth to someone who knows where to look.
Two lessons follow, one for each side of the API.
If you send prompts to an inference provider, assume some of them end up stored. Together's notice says its samples came from requests "authorized for that use." Your own account settings and the provider's terms decide whether your requests are in that pool. Together has now made zero data retention the default for new accounts. StartupHub.ai points out that older accounts do not get the new default, and the notice tells customers handling sensitive prompts to enable ZDR in account settings. Then rotate any secret you know went into a prompt to MiniMax M3, GLM-5.2 or Kimi K2.6 on Together around those four dates.
If you run a service that stores samples of customer input for testing, those samples hold your customers' credentials. Scrub them before you store them, and keep the scrubbed set behind a credential that can do nothing else. A test fixture built from production traffic is production data with weaker controls.
Put the control before the push
Together's scanner worked. It found the credential and someone acted. The problem is where the scanner sat: after the push, on a public repository, where the exposure starts the instant the push lands. A CI job has the same problem. A workflow that runs on push to a public branch reads the commit only once everyone else can.
Controls that act before the data leaves the machine are the ones that would have changed the outcome. There are three, and they fail in different ways, so use all of them.
Scan every commit the agent makes
A pre-commit hook runs on the machine where the agent works, before the commit exists. gitleaks ships rules for Hugging Face access tokens (hf_ prefix) and organization tokens (api_org_ prefix). Its default config holds about 220 rules in all. Its pre-commit hook scans only the staged changes, so it costs little to run on every commit:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
Run pre-commit install in the repository so the hook fires for every commit, including the ones an agent makes through the shell. Agents commit through the same git binary you do, so they hit the same hook.
The hook has a known hole. git commit --no-verify skips it, and an agent told to "get the commit through" may reach for that flag when a hook blocks it. Our pre-commit guide covers the setup in more detail. Treat the hook as the first catch. The next two controls cover what it misses.
Turn on push protection
GitHub's push protection checks a push on the server and blocks it if it contains a supported secret, before the commit reaches the repository. Push protection for users is on by default for GitHub.com accounts and stops you from pushing supported secrets to public repositories. Push protection for repositories is a separate setting that an admin enables at the repository, organization or enterprise level. It generates an alert when someone bypasses it, which is what you want when the someone might be an agent.
Push protection only knows the formats in GitHub's supported patterns list. Check that list for every token type your agents can see. For any that are missing, the local hook is your only pre-push check, so make sure it runs.
Keep the credential out of the working tree
The strongest of the three is the one that does not depend on a scanner recognizing a format. A coding agent commits what it can read. If the Hugging Face token lives in a .env file in the repository, in a config the agent opened, or in the shell environment the agent's commands inherit, then sooner or later it ends up in a file the agent writes. A test script with the token pasted in, or a debug log committed by accident.
Hugging Face gives you two ways to shrink what that token can do. Fine-grained tokens can be limited to specific repositories, and Hugging Face recommends them for production use for this reason. A token scoped to read one model cannot read the dataset next to it. For CI, Trusted Publishers trades the CI provider's OIDC identity token for a short-lived Hub token at the start of each run, so no long-lived Hub token sits in CI secrets at all.
Neither removes the token from the agent's reach on a developer machine. For that, the process that needs the token should get it at run time, and the agent's shell should never hold it. The agent can then run the upload script, and the script gets the token, but the agent has nothing to paste into a file.
What this means for your stack
Do two things this week. Add a secret-scanning pre-commit hook to every repository where an agent commits, and turn on push protection for those repositories. Then write a one-page runbook that says what to do when a scanner fires on a public push: revoke at the issuer, pull access logs from the push onward, then clean up history. If you have an older Together account and send sensitive prompts, turn on ZDR and rotate anything you know you sent to the three affected models in June and July.
The pattern behind this incident is a long-lived credential sitting where the agent can read it, guarding a dataset full of other people's credentials. The fix for the first half is runtime injection: the agent asks for an action, a broker hands the credential to the one process that needs it, and the value never appears in the agent's context or working tree. The fix for the second half is to scrub stored prompts and scope every token to one resource, so a leaked one opens one door.
hasp is one working implementation of runtime injection on a developer machine. After hasp setup, hasp run --project-root . --env HF_TOKEN=@HF_TOKEN --grant-secret window --grant-window 15m -- python scripts/push_samples.py gives the token to that script for 15 minutes, and the agent that wrote the command sees only the reference. It cannot protect a token you paste into a prompt yourself, and its threat model does not cover a malicious process running as the same user. Source-available (FCL-1.0), local-first, macOS and Linux, no account.
Together found the leaked credential and reverted it. The intruder still had the dataset, and the dataset still had keys in it. Count the minutes from push to revocation, and keep the keys out of what your agent can write.
Sources· cited above, in one place
- Together AI Security event: Prompt leakage for requests in June and July of 2026
- Unite.AI Together AI discloses prompt leak after coding agent exposed credential
- Futurum Group Together AI's agent credential leak exposes agentic pipeline risk
- StartupHub.ai Together AI says coding agent leaked user prompts
- Dragos (HD Moore) Three breaches, endless leaks: Your AI supply chain needs canaries
- Hugging Face User access tokens: fine-grained tokens and revoking a leaked token
- Hugging Face Trusted Publishers: short-lived Hub tokens from CI OIDC
- GitHub Docs Removing sensitive data from a repository
- GitHub Docs About push protection
- Gitleaks Git secret scanner
Stop handing the agent your real keys.
hasp keeps secrets in one local encrypted vault, brokers them into the child process at exec, and never lets the agent read the value.
- Local, encrypted vault — no account, no cloud, no telemetry by default.
- Brokered run — agent gets a reference, the child process gets the value.
- Pre-commit + pre-push hooks catch managed values before they ship.
- Append-only HMAC audit log answers "did the agent touch the prod token?" in seconds.
macOS & Linux. Source-available (FCL-1.0, converts to Apache 2.0). No account.