After OpenCode key leak: 5 practical rules for keeping keys away from agents
jacobholm_dev · reddit · 2026-10-26
After OpenCode's breach (an Oct 16 intrusion into a legacy system may have exposed saved OpenAI, Anthropic and Google keys for 1.4% of Console users), the author shares 5 production rules for agent credentials:
- Never let the agent hold the real key — anything in prompts, readable env, or tool output is assumed leakable
- Put a broker/proxy in between (Infisical Agent Vault, Latch, Keycard) so agents only see placeholders
- When a real key must exist: scoped, short-lived (hours not months), read-only where possible
- Per-agent provider keys with hard spend caps — you know which agent caused damage and it has a ceiling
- On leak: revoke at the provider first, then rotate; deleting from your own config doesn't help
He asks how others run proxy setups in prod.
More from coding & agent
- Firecrawl offers 2.5x credits to a16z Speedrun founders, unveils $75M Series B — devdigest · 2026-10-27
- Chums: open-source Apple Watch app puts Claude Code and Codex on your wrist — brandon_galang · 2026-10-27
- Open-source Clairic Studio turns pasted text into typed data and working code in 5 languages — dfinke · 2026-10-27
- Matt Pocock shares expand/contract trick: split one-way-door PRs to de-risk big changes — mattpocockuk · 2026-10-27
- Qdrant builds Universal I/O to run vector search mmap code on object storage — qdrant_engine · 2026-10-27
- theo publishes tstack skills, Garry Tan urges everyone to 'publish your stack' — ycombinator · 2026-10-26