Security researchers at the AI security firm Apiiro have uncovered a significant data leak involving Anthropic's Claude Code assistant. The incident occurred when local settings files associated with the tool were unintentionally committed to public GitHub repositories, exposing thousands of sensitive credentials. The compromised information reportedly includes database passwords, API tokens, and root login details.

The root cause of this exposure traces back to how the assistant manages user approvals for automated shell commands. When a developer selects the "Yes, and don't ask again" option to authorize a command, the tool stores this preference in a local configuration file named .claude/settings.local.json. Because the system frequently records the exact command string rather than an abstract rule pattern, any confidential information embedded within the original command is written directly into the file.

According to Anthropic's documentation, this specific settings file is automatically appended to the developer's global .gitignore list, a measure that generally prevents it from being uploaded to public version control systems. Researchers note that while retaining these files locally does not constitute a major security flaw on its own, the accidental inclusion of these configuration files in shared codebases creates substantial vulnerabilities.