AI coding agents leaked thousands of secrets to GitHub
AI Coding Agents Leak Thousands of Secrets to GitHub
Research by security company Apiiro found that AI coding agents are leaking developer credentials to public GitHub repositories, with 2539 credentials found in nearly 2000 public repositories, involving developers from 63 organizations, including production Azure Postgres passwords and medical records database owner passwords. Taking Claude Code as an example, after a user selects "Yes, and don't ask again", the tool stores the command containing the key in .claude/settings.local.json; that file is only added to the developer's local global Git ignore, the rule does not migrate when the repository is cloned, nor is it written to the repository's own .gitignore, and thus it is committed along with the code. Boris Cherny, head of Anthropic Claude Code, said that Claude Code previously did not perform secret scrubbing, and the company is exploring prototyping solutions such as automatic mode interception and basic secret scanning before the next version.
The study identifies the specific mechanism by which keys flow through Claude Code configuration files into public repositories; teams using AI coding tools can use this to inspect agent configuration files and rotate credentials.