OpenCode breach exposed AI provider keys: stop parking them
An OpenCode Console breach exposed saved OpenAI, Anthropic and Google API keys for 1.4% of users. Revoke at the provider, then stop storing keys in tools.
Your AI provider key is only as safe as the least careful tool you pasted it into. On October 17, OpenCode, the open-source AI coding agent, said on X that a breach tied to a "large scale distillation attack" hit 1.4% of OpenCode Console users. The exposed data: third-party provider API keys that users had saved in their Console workspaces. The OpenCode breach is a clean lesson in where AI keys should and should not live.
What actually happened
Per OpenCode's post and the email it sent to affected users, as reported by OfficeChai:
- The entry point. Unauthorized access to a legacy system OpenCode was in the process of shutting down.
- The exposure. Provider keys saved in Console workspaces, with OpenAI and Anthropic named. Reports also include Google keys.
- The scope. About 1.4% of Console users. If you got no email, OpenCode says you were not affected.
- The ask. Revoke and replace the keys in each provider's own dashboard, update any app that used them, and check recent usage for calls you did not make.
- The gaps. No post-mortem yet. No count of accounts, no timeline, no detail on how the attacker got in. OpenCode says it is working with Anthropic, OpenAI and Google.
"Distillation" here means using someone else's paid model access to harvest outputs at scale. Your key pays for the attacker's training data.
Why it matters for your business
The day before, Help Net Security reported on Bitsight research into MONST3R-AI, a tool sold on a criminal forum. Buyers load stolen OpenAI, Anthropic or Google keys, set a budget, and point an AI agent at targets. The key owner pays for the attack. Stolen AI keys are now a product with a resale market.
We just covered an infostealer that lifts AI keys off laptops. This is the other half of the problem: keys you handed to a vendor on purpose. Every dashboard that asks you to "bring your own key" becomes one more vault you do not control.
What we do instead:
- One key per tool. A key pasted into a coding agent console is that tool's key and nothing else. When the tool leaks, you revoke one key and nothing else breaks.
- Spend caps on every key. A hard monthly limit turns a stolen key from an open tab into a capped loss.
- Prefer tools that keep keys local. A CLI that reads from your OS keychain beats a hosted workspace that stores your key on its server.
- Revoke at the source. Deleting a key inside the tool does nothing if the tool's database is already copied. The provider console is the only kill switch.
- Watch usage daily. An alert on unusual token volume is the cheapest breach detector you can buy.
Key takeaways
- OpenCode says a breach exposed saved provider keys for 1.4% of Console users on October 17
- OpenAI and Anthropic keys are named; affected users should revoke at each provider, not in the tool
- Bitsight found a criminal tool, MONST3R-AI, built to run attacks on stolen AI keys
- Issue one capped key per tool so a vendor breach costs you one key
- Prefer tools that keep keys on your machine over tools that store them for you
How many tools hold your AI keys right now? We map every place your team's model keys live, split them per tool, cap them, and wire up usage alerts. See how we build it, or ask for a key audit.
Sources: OpenCode on X, OfficeChai, Help Net Security.
- #opencode
- #api-keys
- #ai-coding-agents
- #security
- #breach
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
RapidCanvas raises $29M for custom AI apps: who tests them?
RapidCanvas raised a $29M Series B to build custom AI apps for mid-market firms. The real product is its test harness. Ask any AI vendor how they test production.
Read itPostgres 19 Slips to November: AI Code Review Outran the Fixes
PostgreSQL 19 GA moves to about November 19 after LLM code review surfaced bugs faster than maintainers could fix them. What that means for your AI review pipeline.
Read it