Anthropic's Claude Code Leaks Thousands of Production Credentials on GitHub
Security researchers discovered that Anthropic's Claude Code AI agent accidentally leaked thousands of real production credentials and sensitive tokens into public GitHub repositories via local settings files. The vulnerability stems from how the tool records auto-executed shell commands containing sensitive data into configuration files that subsequently get committed to version control. This incident exposes critical security risks associated with autonomous AI coding agents handling sensitive production secrets and interacting directly with developer environments. As organizations increasingly adopt AI-assisted development, improper handling of local configurations can lead to severe data breaches affecting startups and enterprises alike. Apiiro researchers identified 2,539 real credentials across 1,994 repositories, including Azure database passwords, Square production tokens, and SSH root credentials. Anthropic representatives acknowledged the issue and stated they are working on preventive measures and exploring built-in secret scanning features.
## BACKGROUND
Claude Code is an agentic coding tool developed by Anthropic that operates directly within the developer's terminal, allowing it to understand codebases, edit files, and execute shell commands. In local development environments, tools often generate configuration files to store user preferences or command permissions, which are expected to be excluded from version control systems using exclusion patterns like .gitignore.