Claude Code Settings Leak 2,539 Secrets
Researchers found thousands of live credentials saved in Claude Code permission files across public GitHub repositories.
Updated on Nov. 24, 2026 in Artificial Intelligence

Live Poll
Do you trust AI coding tools to keep your passwords out of saved files?
Researchers found 2,539 distinct secrets in 1,994 repositories stored in Claude Code permission files. Anthropic shipped a Claude Code update in mid-November that stops saving secret-containing allow rules to disk.
Why it matters
Claude Code saves approved shell commands, including any embedded passwords or tokens, to a local settings file that can end up in public code repositories. The exposure shows how developer convenience features can quietly widen the attack surface for credentials.
Of the 1,122 files with a real secret, about one in five was flagged by neither gitleaks nor TruffleHog, while GitGuardian counted 31,088 distinct secrets across 23,276 repositories, 5,343 of which were still valid when found.
The players
Anthropic
Anthropic is an artificial intelligence company that develops the Claude family of AI models and the Claude Code developer tool.
GitGuardian
GitGuardian is a cybersecurity company that specializes in detecting exposed secrets and credentials in software code and repositories.
The details
Claude Code's "Yes, and don't ask again" option saves the exact approved command, including any embedded password or token, to .claude/settings.local.json inside the project folder. The file is added to the developer's global git-ignore list, not the project's own .gitignore, and researchers found the exposed secrets included a database vendor's admin-level cloud key, a production Azure Postgres password, a Square production token and a medical-records database owner password.
Timeline
April: Monthly leaks into these settings files peaked before falling by more than 90 percent.
Mid-November: Anthropic shipped a Claude Code update that stops saving secret-containing allow rules to disk.
The Tech Race
The exposure centers on Claude Code's "Yes, and don't ask again" permission-saving feature, which Anthropic changed in mid-November to stop saving secret-containing rules to disk. The fix places Anthropic's developer tooling in a broader race among AI coding assistants to balance convenience against the security of the credentials they handle.
Developers who use Claude Code should check whether their project folders contain a settings.local.json file with saved approvals and remove any embedded credentials. Anyone who committed such a file should treat the exposed secrets as compromised and rotate them.
The takeaway
Convenience features that remember approvals can silently store live credentials, so developers should audit local tool settings files before committing projects. Rotating any secret that may have appeared in a public repository is the safest response.
Further reading
Explore more reporting in Artificial Intelligence to see how AI developer tools are reshaping software security.
Source note: This article includes information reported by SecurityBrief Asia.
Live Poll
Do you trust AI coding tools to keep your passwords out of saved files?



