Claude Code leaks secrets via "Don't Ask Again" feature

infoq.com —

Security firm Apiiro discovered that Anthropic's Claude Code has been leaking secrets into public repositories through its "Don't Ask Again" feature, which stores permanent command approval rules in local configuration files that can contain embedded credentials. The issue stems from Claude Code saving approved shell commands with embedded passwords, API tokens, and cloud keys into `.claude/settings.local.json` files. While the tool adds these files to a developer's global git ignore list, this protection fails when folders become repositories later, files are cloned elsewhere, or already committed, with Claude Code itself committing the file in some cases. Apiiro identified 1,122 secrets in local settings files and 1,160 more in git history, affecting 63 organizations. GitGuardian later found 31,088 secrets in public GitHub repositories, with 5,343 still valid, plus 613 in Docker Hub images. Standard secret scanners missed many exposures because credentials were embedded within shell commands, and the consistent file path makes the data easily accessible to malware.


With a significance score of 3.8, this news ranks in the top 4.9% of today's 30203 analyzed articles.

Get summaries of news with significance over 5.5 (usually ~10 stories per week). Read by 10,000+ subscribers: