Claude Code settings files exposed credentials in public GitHub repositories, Apiiro reports

In a report covered on November 11, 2026, AI security company Apiiro said it found more than 100,000 Claude Code settings files uploaded to public GitHub repositories. About 1,100 files from 63 organizations contained secrets, including database passwords, API tokens and root login information. Apiiro said 215 of those secrets were not detected by the commonly used scanners gitleaks and TruffleHog.

The risk arises when a user approves a shell command with “Yes, and don’t ask again.” Claude Code saves the permission as a rule in .claude/settings.local.json. According to Apiiro, the rule can contain the original command—including any credentials embedded in it—rather than a generalized pattern.

Anthropic’s documentation says the file is added to a developer’s global .gitignore. That protection does not appear in the repository itself, so the file can be uploaded if a repository is cloned onto another machine or a folder later becomes a repository. Apiiro also said Claude Code sometimes commits changes to the file without user intervention. Deleting an exposed file may not remove its contents from repository forks.

The issue had been raised in Claude Code bug reports as early as August 2025; those reports were closed after 60 days without activity. Responding on Hacker News, Claude Code’s Boris Cherny said the team was investigating ways to prevent the problem. He said such settings files generally should not be committed and suggested the cases appeared to involve files being manually created and committed. Cherny recommended auto mode and secret-scanning tools, and said the team was considering built-in secret scanning.