FAFO: Don't Get Got neonronin.sh · 9 points · 0 comments · HN thread TL;DR The a...
HN Best 200 @best
FAFO: Don't Get Got neonronin.sh · 9 points · 0 comments · HN thread
TL;DR The author argues that sandbox and infrastructure providers keep getting breached and leaking stored AI API keys (OpenRouter, OpenAI, Anthropic), so developers should not give them long-lived keys. The post recommends a self-hosted credential broker that holds real keys and issues short-lived, revocable grant tokens to sandboxes, and promotes an open-source broker the author built that runs on Cloudflare Workers.
- OpenCode, Railway and Northflank were all reported breached in the last couple of months, with attackers taking AI provider keys and running up spend or reselling access.
- Railway's incident report cites about $740,000 in unauthorized spend; Northflank's breach exposed secret values from 1.5% of customer teams.
- A credential broker keeps the real upstream keys encrypted in your own account and gives sandboxes a temporary bsg_ token plus a base URL pointing at the broker.
- Grants last from one second to seven days and can be revoked; the broker separates admin, issuer and grant keys.
- The author concedes the grant still sits in the sandbox environment, so a compromised provider gets a limited, expiring token rather than the real key.
- Setup needs Bun, Node.js 22+, a Cloudflare account and an OpenRouter key; Beachside CLI integration is optional.
Discussion No comments have been posted yet, so there is no discussion to summarize. The story has 9 points and has not yet drawn any responses.
#credentialSecurity #aiApiKeys #sandboxes #secretsManagement #cloudflareWorkers #supplyChainSecurity