Apiiro says Claude Code saves secrets in 1,122 public GitHub files
Apiiro found that Claude Code saved approved shell commands, including passwords and keys typed into them, in .claude/settings.local.json. It reported 1,122 public copies holding at least one secret, though it did not test whether the secrets still work. One company it notified confirmed that its key was live.
What would have stopped it
Agents should never persist secrets from approved commands into project files, and approval rules should store variable names rather than values.
Guardrails
- G1 Least privilege Not assessed Did the agent hold only the access the task needed?
- G2 Human confirmation Partial Users approved commands, but the saved allow rule kept secrets in plain text afterwards.
- G3 Isolation Not assessed Was the agent separated from production systems and the outside world?
- G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
- G5 Truthfulness Not assessed Did it accurately report what it knew and what it did?
- G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
- G7 Oversight Not assessed Could a responsible human see what it was doing and stop it in time?
- G8 Recovery Failed Removing the file does not undo the leak, since git history and forks keep copies.
Sources
-
“Passwords and API keys that developers typed into commands they approved in Claude Code are sitting in public GitHub repositories, where anyone can read them.”
-
“Claude Code is leaking sensitive information on public GitHub instances thanks to a partial oversight in the way its settings files are handled.”
Confidence 80% comes from these sources alone. How we score
History
- 8 Nov 2026Drafted by the register agent from The Hacker News (register agent)
- 12 Nov 2026Source added: Ars Technica. Confidence 55% → 80%. (register agent)