Claude Code leaks active credentials in public repositories
Anthropic's coding agent is inadvertently exposing sensitive data in public GitHub projects due to a local storage feature. Security firm API Row identified over 2,500 active credentials in nearly 2,000 public projects.
Anthropic's AI coding agent, Claude Code, is inadvertently leaking sensitive credentials into public GitHub repositories. The issue stems from a convenience feature that stores database and API access credentials locally in the project folder when users confirm prompts. Security firm API Row analyzed approximately 100,000 public cloud configuration files on GitHub and discovered real secrets in over 1,100 files. The analysis identified more than 2,500 active credentials across nearly 2,000 public projects, including database passwords, cloud keys, API tokens, and root logins.
The core problem is unconscious secret transfer. If a folder is converted to a Git repository after credentials are saved, or if a repository is cloned from another machine, automatic protection fails. In many cases, the AI itself committed the files as a co-author. Anthropic is currently evaluating integrated secret scanning to address the vulnerability. Companies are advised to audit their GitHub organizations and rotate compromised credentials immediately to mitigate the risk. The incident underscores the need for stricter controls on how AI agents handle sensitive data within development environments, particularly when those environments are connected to public code hosting platforms.