Claude Code can commit secrets into public GitHub repos
Original title: AI Coding Agents Leak Thousands of Secrets to GitHub
Apiiro counted 2,539 credentials in nearly 2,000 public repositories, including production tokens and a medical database password.
Apiiro says approving a Claude Code command with “Yes, and don't ask again” stores that command, secret included, in .claude/settings.local.json. Nothing marks the file private, so it can be committed with the project. Researchers linked some of the exposed credentials to this behavior. Most belonged to individual developers across 63 organizations, from student groups to vendors.
Unconfirmed: Apiiro attributes some, not all, of the public credentials to Claude Code.
- Exposed data included database passwords, cloud keys, API tokens, and SSH root logins.
- Examples include an Azure Postgres password and a Square production token.
- The file written inside the project is .claude/settings.local.json.
- Products
- GitHub
- Organizations
- Apiiro
- AI models
- Claude Code
From the original article
8 min read at darkreading.com
A command in Claude Code inadvertently saves files with credentials and other sensitive data to public Git repositories, creating security gaps for organizations.
By Elizabeth Montalbano · darkreading.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.