Did Claude Code’s ‘don’t ask again’ option accidentally expose your enterprise’s passwords and keys?

WorkAI.TV Editorial Desk
4 Min Read

Share with your CISO

Cybersecurity firm Apiiro found 1,122 publicly accessible Claude Code settings files on GitHub containing live credentials, including production database passwords, cloud API keys, and tokens tied to a medical records application. The root cause is Claude Code’s “Yes, and don’t ask again” permission feature, which saves entire approved commands, secrets included, into a local file that can slip past Git’s ignore rules and become publicly readable. Apiiro’s full investigation across 103,617 repositories surfaced 2,539 distinct credentials across 1,994 public repos, with at least one confirmed active key among them.

What this means for your business

The threat model most enterprises apply to AI coding tools focuses on what the agent does while running: does it execute unauthorized code, does it call the wrong API, does it touch prod when it shouldn’t. This incident exposes a different attack surface entirely. The artifact the agent leaves behind, a routine settings file, becomes the breach vector. A developer on your platform team clicks “don’t ask again” on a database migration command, and that credential sits in a public repo for months before anyone notices.

Call this the audit trail attack. AI agents, by design, persist context to operate efficiently across sessions. That persistence is exactly what makes them useful and exactly what makes them dangerous when the persistence layer touches version control. The 1.1% exposure rate Apiiro found sounds small until you map it against the number of repos your engineering org manages. A hundred repositories means statistically one credential leak. Five hundred means five. The math compounds fast, and your existing secrets-scanning tools almost certainly weren’t tuned to look inside Claude Code’s settings schema.

Anthropic’s head of Claude Code acknowledged the problem on Hacker News but hasn’t committed to a fix timeline. That gap is your problem to manage now, not later. The signal worth watching: whether Anthropic ships credential scanning natively into Claude Code before a major breach forces regulatory scrutiny onto AI-assisted development tools as a category. If that scrutiny arrives first, expect procurement and legal to start asking questions about every agentic coding tool in your stack, not just this one.

Concept deep-dive: Git history persistence

When a file is committed to a Git repository, it’s not just saved, it’s permanently recorded in the repository’s revision history. Deleting the file in a later commit doesn’t erase the earlier entry. Anyone with access to the repo can run a single command to retrieve any previous version of any file ever committed. This is why Apiiro’s remediation steps emphasize rotating credentials, not just removing the settings file. Removing the file from GitHub today leaves every historical commit intact, and those commits are often mirrored by forks, clones, and third-party scanning services before you act.

Based on reporting from Did Claude Code’s ‘don’t ask again’ option accidentally expose your enterprise’s passwords and keys?, originally published 2026-11-09 22:49:00.

Share This Article