Claude Code 'Don't Ask Again' Blunder Leaks Passwords Across GitHub
A convenience setting in Anthropic's Claude Code CLI has exposed sensitive credentials across 1,122 public GitHub repositories, according to security researchers at Apiiro.
When autonomous AI coding assistants promise frictionless velocity, convenience often eclipses fundamental security hygiene. According to new research published by application security firm Apiiro, Anthropic's terminal-based assistant, Claude Code, has inadvertently fueled a wave of credential exposures across the open-source ecosystem. Researchers identified at least 1,122 public GitHub repositories housing plaintext passwords, API tokens, and confidential operational parameters tied directly to Claude Code's configuration artifacts.
The root cause lies in Anthropic's developer ergonomics, specifically the CLI's "Don't Ask Again" approval mechanism. When Claude Code executes shell commands, runs integration tests, or configures local environments, it prompts developers for explicit execution permissions. To avoid repetitive confirmation fatigue during extended coding sessions, developers routinely select "Don't Ask Again." Claude Code subsequently serializes these approved commands—often containing embedded environment variables, database connection strings, and live API secrets—into project-adjacent state files such as .claude.json and configuration dotfiles.
Because many developers hastily run broad commands like git add . without inspecting unstaged files, these local caches are committed directly into version control. Apiiro's investigation revealed that threat actors running automated scrapers can easily harvest high-privilege access keys, cloud infrastructure tokens, and administrative credentials simply by targeting Claude Code's persistent file naming conventions across public GitHub repositories.
This incident underscores a broader systemic hazard in the rapid enterprise transition toward agentic software engineering. As developer environments embrace autonomous agents like Claude Code, Cursor, and OpenAI Operator, CLI tools frequently store command logs, conversation histories, and environment snapshots directly in repository root folders. Unless developers proactively maintain strict global ignore rules, these artifacts become instant attack vectors the moment code is pushed upstream.
Security analysts emphasize that developer platforms must implement fail-safe defaults rather than shifting the burden entirely onto end users. Recommendations include automatically generating or appending .claude* rules to .gitignore during tool initialization, masking secrets before persisting approved command histories, and integrating automatic pre-commit scanning. For affected teams, remediation requires immediate token revocation, Git history purging with tools like BFG Repo-Cleaner, and sweeping environment variable audits across exposed repositories.
Want real-time AI & tech intelligence dispatches?
Join the official TrendingTech Daily Telegram channel for breaking research, model launches, and market analysis.