{"slug": "after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live", "title": "After the agent-tool breach, I asked: where do my API keys actually live?", "summary": "A developer built keymap, a dependency-free local Python tool that scans the config files agent tools, CLIs and shells read — including ~/.claude.json, ~/.codex/config.toml, ~/.env, shell rc files and history, and ~/.aws/credentials — to inventory where provider API keys and secrets are stored. The tool reports each key's location, flags world-readable files and keys staged for or already in git, and ends with a rotation checklist linking the revoke page for each provider. The developer created it after an agent-tool vendor breach exposed provider API keys in its console workspaces, noting that finding a key in five places is normal rather than careless.", "body_md": "A few days ago, an agent-tool vendor disclosed a breach that exposed\n\nprovider API keys stored in its console workspaces. My first thought\n\nwasn't about their infrastructure. It was much more embarrassing:\n\n*Which keys do I even have, and where are they stored?*\n\nI couldn't answer that in under a minute. And I suspect most developers\n\ncan't. A provider key gets pasted into one agent tool's config, then\n\nanother's, then an `.env` file, then shell history — and every copy is\n\nanother place it can leak from, and another line on the bill if someone\n\nabuses it.\n\nSo I built a small tool that answers the question locally: **keymap**.\n\nOne command, no dependencies, no network:\n\n```\npython -m keymap\n```\n\nIt scans the config files your agent tools, CLIs and shells actually\n\nread — `~/.claude.json`, `~/.codex/config.toml`, `~/.env`, shell rc\n\nfiles and history, `~/.aws/credentials`, and friends — and reports:\n\n`*_API_KEY` /\n`*_TOKEN` / `*_SECRET` variable it doesn't recognise),`chmod 600` it),`git add .` away from a commit — or\nalready tracked.\nIt finishes with a rotation checklist: the exact revoke page for every\n\nprovider it found. After a vendor breach, that's the difference\n\nbetween a scavenger hunt and a checklist.\n\n`sk-ant-…`) plus a SHA-256 fingerprint prefix, so you can recognise\nthe The repo ships `examples/demo-home/` — a fake home with the same\n\nAnthropic key in two files, an OpenAI key in `.env` *and* shell\n\nhistory, a GitHub token, and a world-readable `.env`:\n\n```\nsh examples/run-demo.sh\n```\n\nIf you run it on your real home and find a key in five places, you're\n\nnot careless — you're normal. That's exactly why I built it.", "url": "https://wpnews.pro/news/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live", "canonical_source": "https://dev.to/techdevfun/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live-4hj3", "published_at": "2026-10-21 06:58:09+00:00", "updated_at": "2026-10-21 07:10:16.697951+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-safety"], "entities": ["keymap", "Anthropic", "OpenAI", "GitHub", "AWS"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live", "markdown": "https://wpnews.pro/news/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live.md", "text": "https://wpnews.pro/news/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live.txt", "jsonld": "https://wpnews.pro/news/after-the-agent-tool-breach-i-asked-where-do-my-api-keys-actually-live.jsonld"}}