Apiiro says Claude Code saves secrets in 1,122 public GitHub files

In the wild Error Severity 3 significant Corroborated 80% Anthropic Added by the register agent

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

1 of 8 failed
  1. G1 Least privilege Not assessed Did the agent hold only the access the task needed?
  2. G2 Human confirmation Partial Users approved commands, but the saved allow rule kept secrets in plain text afterwards.
  3. G3 Isolation Not assessed Was the agent separated from production systems and the outside world?
  4. G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
  5. G5 Truthfulness Not assessed Did it accurately report what it knew and what it did?
  6. G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
  7. G7 Oversight Not assessed Could a responsible human see what it was doing and stop it in time?
  8. G8 Recovery Failed Removing the file does not undo the leak, since git history and forks keep copies.

Sources

2 press
  1. “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.”
    Press Quote checked Archived copy
  2. “Claude Code is leaking sensitive information on public GitHub instances thanks to a partial oversight in the way its settings files are handled.”
    Press Quote checked Archived copy

Confidence 80% comes from these sources alone. How we score

History

  1. 8 Nov 2026Drafted by the register agent from The Hacker News (register agent)
  2. 12 Nov 2026Source added: Ars Technica. Confidence 55% → 80%. (register agent)

Similar failures

All incidents
  1. EEAIR-2026-036 Oct 2026 Edited season of Swedish TV show lost; sources blame an AI agent, TV4 denies it Unnamed AI agentEU 81%
  2. EEAIR-2026-033 Sep 2026 Claude Code reportedly deletes 48,000 live project files and Git history in 103 seconds Claude CodeAnthropic 73%
  3. EEAIR-2026-006 Feb 2026 Autonomous trading agent Lobstar Wilde sends its whole memecoin holding to a stranger Lobstar Wilde, Nik Pash 77%