Breakdown: an AI coding agent committed a key to Together AI's public repo, and someone used it to download stored customer prompts
By Abbi Labs · Published 28 November 2026
Did a key make it into your live site too?
The Abbi Labs quick check opens your live, public site as a signed-out visitor and looks for secret-looking keys in its JavaScript (OpenAI, Anthropic, Stripe, GitHub and others), exposed .env and .git files, and Supabase tables readable with your public key. It doesn't read your GitHub repos, your commit history or your agent's chat logs, so do the repo checks below yourself. No sign-up.
No app handy?
Example result · our deliberately broken demo app
6 issues found: 3 critical, 1 high, 1 medium, 1 low
- Critical: Stripe live secret key in public JavaScript
- Critical: /.env file readable by anyone
- High: Git repository exposed (/.git/HEAD)
The demo's problems are planted on purpose. Paste your own URL above to see yours.
No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.
Run on every deploy or use from Cursor / Claude Code via MCP →
Weekly AI-app security checklist
One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.
On 21 November 2026, Together AI, an AI inference company, published a short security notice. The cause fits in one sentence from it: "During development of our public GitHub repository, xorl, an AI coding agent committed a credential that provided access to the private Hugging Face repository." That private repository held samples of customer prompts. Someone found the credential before it was dead and downloaded them.
This is the failure most people building with Cursor, Claude Code, Codex or Lovable's GitHub sync can actually have this week. Nobody needed a zero-day. An agent with a key in reach put it in a commit, and the commit went to a public repo.
Everything below comes from Together AI's notice unless I say otherwise. Where something isn't public, I say so.
What happened
- The data. For "routine software testing", Together collected prompt samples, which it says were authorized for that use, and kept them in a private Hugging Face repository. They came from requests to the MiniMax M3, GLM-5.2 and Kimi K2.6 models on its serverless inference service, mainly on 24 June, 4 July, 8 July and 14 July 2026.
- The leak. While working on xorl, its public GitHub repository, an AI coding agent committed a credential that opened that private Hugging Face repo.
- The catch. Together's automated scanning detected the exposed credential and the commit was reverted.
- Too late. "During the exposure window, an unauthorized party obtained the credential and used it to download the stored prompt samples." They then searched the prompts for credentials to other services and tested whether those worked.
- The canaries. Five of the credentials they tested were canaries from a Dragos security experiment. Dragos says it sent nearly two million prompts with unique trackable secrets to AI providers from July to November 2026, and saw activity showing data from at least three providers had been exposed.
What's confirmed and what we don't know
- Confirmed by Together: an AI coding agent made the commit, scanning caught it, the commit was reverted, an unauthorized party still got the credential, downloaded the samples and tested credentials found in them. Together has worked with an outside forensic firm and law enforcement and says it has found no further prompt leakage.
- Not public: which agent or model made the commit, how the credential got into the agent's working files, the commit date, and how long the exposure window was. Also not public yet: how many customers' prompts were in the samples and what was in them. Together says that review is ongoing and it will contact affected customers directly.
- Not a model jailbreak or a "rogue agent" story. Nothing in the notice says the agent did anything deliberate. It committed a secret that was within its reach, the way a tired developer does. The person who used it was a human third party.
- The OpenRouter angle. BleepingComputer reported that OpenRouter dropped three providers after Dragos's findings. Together told BleepingComputer it was not one of the providers removed. I'm not drawing any line between Together and the other providers' incidents.
Why this matters if you build with AI
Most vibe-coded projects live in a GitHub repo the builder tool pushes to. Plenty of those repos are public. And the agent doing the pushing can usually read everything in the folder: .env, a config file you pasted a token into "just for now", a test script with a key hardcoded.
Together is a big, security-aware company. It had secret scanning on, and it worked. The key was still used. Two lessons come out of that:
- Detection after the push is a race you can lose. People run bots that watch new public commits for keys. A revert only removes the key from the latest version. The old commit, any fork and any scraper's copy still have it. Only rotating the key ends it.
- A key's blast radius is everything it can open. One Hugging Face token opened a whole repo of other people's prompts, and those prompts held more keys. The attacker went straight for them.
It isn't a one-off either. Backslash Security published research on 25 November 2026 after scanning 2,504 public GitHub repos that held AI coding-tool chat logs and agent files. It found 708 secrets in 255 of them, and says about 7 in 10 got into the logs through the agent's own actions (writing a key into a config file, reading .env, running a command that printed one), not because someone pasted it into the chat. Every one of the nine tools it looked at leaked this way.
How to check your own repo (10 minutes)
- Is the repo public? On GitHub, check the repo's visibility. If your builder tool created it for you, look at every repo it made. Anything that doesn't need to be public, make private.
- Scan the whole history, not just today's files. With gitleaks installed, from the repo folder:
No tool? A rough first pass for common key prefixes, including Hugging Face (gitleaks git -vhf_):git log -p --all | grep -nE 'hf_[A-Za-z0-9]{30,}|sk-[A-Za-z0-9_-]{20,}|sk_live_|ghp_|github_pat_|AKIA[0-9A-Z]{16}|service_role' - Look for agent log folders that got committed.
Chat histories and settings files in there can hold keys the agent read or printed. See the Claude Code settings.local.json breakdown for one file that did exactly this.git log --all --name-only --format='' | grep -E '^\.(specstory|claude|cursor|aider)' | sort -u - Check what your agent can read right now. List the files in the project folder that hold real secrets (
.env,.env.local, service account JSON, test scripts). If the agent can open them, it can paste them into a file it later commits.
If you find a key
- Rotate it first. In the provider's dashboard, revoke the key and make a new one. For Hugging Face that's huggingface.co/settings/tokens. This is the step that actually protects you. Reverting the commit isn't.
- Check what it was used for. Look at the provider's usage or access logs for the time the key was public.
- Then clean up. Move the new key to server-side environment variables, add the file to
.gitignore, and only then think about rewriting history. Once the key is dead, rewriting is optional. More in secret keys in git history.
The repo is one place a key leaks. The live site is another.
If an agent will commit a key, it will also happily put one in frontend code. Paste your URL and Abbi Labs checks what a signed-out visitor can see: secret-looking keys in your JavaScript, exposed .env and .git, open Supabase tables. Read-only, no sign-up.
How to stop your agent committing a key next time
- Block secrets before they leave your laptop. Turn on GitHub's push protection for yourself (Settings, Code security, "Push protection for yourself"). It blocks your pushes to public repos when they contain secrets GitHub recognises. Add a local check too, for example gitleaks as a pre-commit hook:
Thenrepos: - repo: https://github.com/gitleaks/gitleaks rev: v8.24.2 hooks: - id: gitleakspre-commit install. Now the agent's commit fails instead of your weekend. - Keep real secrets out of the agent's reach. Don't paste live keys into files in the project "for testing". In Claude Code, Anthropic's settings docs show deny rules that stop it reading env files:
Other tools have their own ignore files. Use them, but treat them as a seatbelt, not a reason to leave keys lying in the folder.{ "permissions": { "deny": ["Read(./.env)", "Read(./.env.*)"] } } - Ignore agent log folders in the project's
.gitignore, not just a global one on your laptop:.specstory/,.claude/settings.local.jsonand whatever your tool writes. - Read the diff before the agent pushes.
git diff --stagedtakes ten seconds. If your agent is allowed to rungit pushon its own, a public repo is one bad commit away. - Use narrow, short-lived tokens. Together's own fixes include scoped or short-lived credentials. A read-only token for one repo that expires next week leaks a lot less than a full-access token that never expires. Hugging Face, GitHub and most AI providers let you scope tokens.
- Don't put live secrets in prompts. The data Together lost was prompts, and the attacker searched them for keys. If you sent requests to Together serverless inference for MiniMax M3, GLM-5.2 or Kimi K2.6 in June or July 2026 with keys inside, rotate those keys. Together suggests customers with sensitive prompt data turn on zero data retention in account settings.
My take
The scary part isn't that an agent made a mistake. Humans have committed keys to public repos forever. It's that Together did the textbook thing, had scanning on, caught it, reverted it, and it still wasn't fast enough. If your plan for leaked keys is "I'll notice and delete it", you've already lost the race. Stop the commit before it happens, keep keys out of the folder the agent works in, and when one slips, rotate first and ask questions later.
Sources
- Together AI, Security event: Prompt leakage for requests in June and July of 2026, 21 November 2026 (primary; the agent commit, revert, download, Dragos canaries, fixes)
- Dragos, AI Supply Chain Security: What Canary Tokens Found, November 2026 (about two million canary prompts, July to November 2026; at least three providers' data exposed)
- BleepingComputer, OpenRouter drops AI providers over leaked prompts and secrets, 23 November 2026 (OpenRouter's response; Together's statement that it was not removed)
- Backslash Security, Secrets Exposed on GitHub by AI Chat Logs, 25 November 2026 (2,504 repos, 708 secrets in 255, about 7 in 10 via the agent's own actions)
- GitHub Docs, Managing push protection for users; gitleaks README (git scan and pre-commit hook); Anthropic, Claude Code settings (Read deny rules for .env)
Related
- Breakdown: Claude Code's "don't ask again" file left 1,379 secrets in public GitHub repos
- Breakdown: keys pasted into old Cursor agent sessions led to a fake Claude Code extension
- Breakdown: Google says attackers edited .claude/settings.json so starting Claude Code pulled a backdoor
- Breakdown: a vibe-coded agent dashboard at METR failed open and leaked an API key worth $600k in credits
- Is an old API key still sitting in your git history?
- AI API key exposed in your frontend
- Exposed .env, .git and source maps
- Cursor app security checklist