Apiiro researchers found that Claude Code configuration files committed to GitHub contained database passwords, API tokens, and root credentials. Their analysis of 104,185 public files identified 1,379 distinct secrets across 1,122 files, bringing the total to 2,539 secrets when including Git history and other files across 1,994 repositories. The issue stems from approved commands being saved in .claude/settings.local.json, which can retain credentials entered inline in a command. Because the file was typically excluded from Git tracking locally rather than through the project’s .gitignore, that protection disappeared when a repository was cloned, forked, or set up on a new machine. Apiiro said Claude Code was the only one of 16 coding agents reviewed to save approved commands in project files by default, while gitleaks and TruffleHog detected no secrets in 215 of the 1,122 compromised files.
Source: Read the original article


