What they did
After a public key-leak incident, a Redditor (u/notomarsol) opened Claude Code directly in their home directory and gave it three rules: find anything that looks like a key, token or password; report file paths and variable names only, never print a value; and don't modify anything, just report. The agent then walked the filesystem on its own, reading files to judge whether each one held a secret.
How it went
It finished in about four minutes and reported 63 secrets: 31 in .env files across old side projects, working AWS credentials in ~/.aws dating to 2022, an OpenAI key and a GitHub token sitting in plain text in an MCP config, npm and Docker tokens, and four API keys in shell history. The poster then spent the evening rotating the live keys, deleting dead projects' .env files, and moving active secrets into a vault.
Worth knowing
The agent followed the no-print rule, but the poster notes that to classify each file it had to read it, so many secrets passed through the context window anyway, with no permission prompt, because reading files in the opened folder is normal behaviour. They conclude a 'never read .env' line in CLAUDE.md is a request, not a lock, and warn that opening the agent in your home folder is itself the risk.