Scan finds 179 API keys on a laptop, 115 stored in Claude Code session transcripts
A developer scanned their home folder of roughly 800,000 files and found 179 real API keys with 1,338 plaintext copies across the disk. Most copies were not in .env files but in coding agent folders, with 115 of the keys appearing in Claude Code's session transcripts under ~/.claude/projects. Transcripts keep whatever the agent read or whatever commands printed, so keys leak into them when agents read .env files, dump environment variables, or log authorization headers. The author recommends rotating any exposed keys, shortening transcript retention, adding deny rules for .env files while noting their limits, and using secret-injection tools and short-lived, scoped keys.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in