AI
Published 2026-11-09 New
Verified 2026-11-17

Apiiro finds secrets saved by Claude Code "don't ask again" permission rules in settings files in public GitHub repositories; Anthropic's head of Claude Code says it is looking into prevention, according to iTnews

iTnews reported on 9 November 2026 that security firm Apiiro found Anthropic's Claude Code saved passwords, API keys and SSH logins in plain text to .claude/settings.local.json files that ended up in more than 1000 public GitHub repositories.

According to iTnews, when a user picked "Yes, and don't ask again" for a command, Claude Code saved an allow rule to that file in the project folder, and where the rule recorded an exact command rather than a pattern, any secret typed into the command was saved with it; Apiiro said this was a property of Claude Code rather than the model. iTnews reports that Apiiro's search found 1122 files with at least one real secret, 1379 distinct secrets in all, including database passwords, Supabase service-role keys, SSH logins and AWS keys, and that Apiiro did not test whether the credentials still worked (source: iTnews).

Boris Cherny, head of Claude Code at Anthropic, said on Hacker News that "Historically Claude Code has not done secret scrubbing (there are many good tools for that), but we are looking into what we can do to prevent this", and argued that because Claude Code gitignores the file when it creates it, the exposed copies had been created manually and checked in, according to iTnews (source: iTnews).

Product
Anthropic Claude Code (permission rules saved to .claude/settings.local.json)
Patch to
Apiiro's advice, according to iTnews: rotate every credential the file has ever held before cleaning up (deleting it leaves secrets in git history, forks and clones); untrack .claude/settings.local.json and add it to each repository's .gitignore; reference secrets as environment variables instead of typing them into commands; approve patterns instead of literal commands.

ai