Claude Code may have put company secrets in public GitHub repos
In brief
According to Apiiro, Claude Code saves approved shell commands in a local file named .claude/settings.local.json when a developer chooses not to be asked again. That file can contain passwords, API keys and tokens, and it has appeared in public repositories. GitGuardian later counted 31,088 secrets in such files on GitHub, of which 5,343 were still valid, plus 613 in Docker Hub images.
Source : InfoQ - « Claude Code Has Been Leaking Secrets through its "Don't Ask Again" Feature »
What it changes for an SME
If your developers use Claude Code, credentials typed into commands may already sit in local settings files or in git history. According to Apiiro, 63 organisations were affected, including cloud API keys, production passwords and npm tokens. You may need to rotate those credentials and clean public copies of your code, which costs time and can interrupt services. GitGuardian had already warned that Cursor, Claude Code and GitHub Copilot leave credentials in config files, logs and shell history.
What you can do
- Search your repositories and git history for .claude/settings.local.json and stop tracking it.
- Rotate every credential that file, transcripts or committed chat logs may have contained.
- Add the file to the project .gitignore and pass secrets through environment variables instead of typing them in commands.
Let's talk about the time you could save.
In 20 minutes, we find where AI could save you time or money. Free, no commitment.