Claude Code caught leaking developer credentials to public GitHub repos

AI coding agent Claude Code has been found accidentally exposing developers' sensitive credentials in public GitHub repositories. Security firm Apiiro discovered over 100,000 Claude Code local settings files uploaded to public repos, with about 1,100 containing database passwords, API tokens, private keys and other secrets. Researchers identified 2,539 real credentials across 1,994 repositories, affecting 63 organizations including student teams, startups and software vendors.

The root cause lies in how Claude Code handles auto-execute command permissions. When users choose "yes, don't ask again", the command text, along with any embedded passwords or tokens, gets written into a local settings file. This file can be accidentally pushed when projects are cloned or folders are later turned into Git repos, and keys may remain in forks even after the leaked files are deleted.

The Claude Code team responded that they are working on preventive measures, advised users to clean up secrets with scanning tools, and are considering building secret scanning into the tool.

SponsoredDomoAI

Comments

Loading comments…