← Back

Anthropic’s Claude Code Leaked Thousands of Passwords to GitHub

Original version ·

Tech evangelists swore AI assistants would replace junior devs, but nobody mentioned they would also inherit the sacred junior tradition of committing raw production credentials directly to public repositories with a cheerful smile.

Security researchers at Apiiro stumbled upon a goldmine while scanning public repositories on GitHub: over 100,000 configuration files generated by Anthropic's terminal assistant, Claude Code. Buried inside these files were live database passwords, cloud tokens, and admin credentials quietly waiting for anyone with an internet connection.

The mishap stemmed from a seemingly harmless UI prompt. Whenever Claude Code wants to execute a terminal command, it asks the user for permission. Ticking "Yes, and don't ask again" saves the exact approved shell command into a project file called .claude/settings.local.json so that the terminal assistant stops nagging during future sessions.

If that command happened to include a raw password or database connection string, Claude Code faithfully wrote the secret in plain text. Because nothing says seamless automation like baking production database credentials straight into a JSON file after an engineer gets tired of confirming command prompts on a Friday afternoon.

Anthropic intended this configuration file to remain strictly on the developer's machine by adding it to the user's global git ignore rules rather than the repository's own .gitignore. However, this stealth protection stayed trapped on that single laptop: the moment another teammate cloned the repo, automated a CI pipeline, or ran the project on a new workstation, git happily tracked the file and pushed it to public cloud remotes.

In over 500 cases discovered by researchers, Claude Code was even explicitly credited as a co-author on the very commits that pushed those credentials live. Boris Cherny, head of Claude Code, argued on Hacker News that users must have added the files manually, but researchers noted that the automated assistant frequently looped itself into git commits.

The haul revealed 1,379 unique credentials exposed across 63 different software organizations. The leaked assets included 379 direct database passwords, 43 SSH keys, 42 tokens for GitHub, GitLab, and npm, plus 23 AWS keys, along with a full administrative cloud key belonging to a database vendor and a database password guarding hospital medical records.

Standard automated scanners completely failed to flag 215 of those compromised files because plain text passwords embedded inside ordinary terminal arguments do not look like cryptographic API tokens. Anthropic rushed out version 2.1.323 to prevent saving sensitive commands and mend the global ignore logic, but the patch left existing exposed secrets and commit histories completely untouched across forks.

The modern software development lifecycle has reached peak efficiency: developers now deploy artificial intelligence to accelerate the exact same catastrophic configuration blunders humans have spent three decades trying to eradicate.

Source: The Hacker News

Comments

This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.

0/24
  1. No comments yet.