Claude Code is accidentally exposing secrets all over GitHub
Summary
- AI security researchers at Apiiro discovered that Anthropic's Claude Code tool has accidentally exposed thousands of secrets on public GitHub repositories.
- The leaks occur because user approvals for automated shell commands containing sensitive data are stored in local settings files that can inadvertently be committed to version control.
- Researchers found over 100,000 instances of the local settings file uploaded to public repositories, with about 1,100 containing actual secrets like API tokens and database passwords.
- Anthropic representatives stated they are looking into ways to prevent these leaks and consider building secret scanning directly into the tool.
Why it matters
AI coding assistants that automatically execute and save shell commands can inadvertently expose critical infrastructure credentials to public repositories if settings files are mishandled.