The Claude Code secrets leak that developers are arguing about starts with a button meant to save you time: don't ask again. In Claude Code, that click can write your password into a settings file in plain text. A bug report about the behavior was closed as not planned. Here is what the published evidence shows, who measured it, and what it means for the repositories you push this week.
The click that saves your password in plain text
You click don't ask again so your agent stops interrupting you. In Claude Code, that click can save your password in plain text inside a settings file.
The evidence comes from the security vendor Apiiro, which scanned 104,185 public GitHub copies of that file, settings.local.json. Of those, 1,122 held a real secret, such as database passwords and AWS keys. That count is Apiiro's own, not Anthropic's, and it comes from a single published scan. This channel has not run the scan or verified the files independently.
A small share of the total, you might think. But a secret does not need anyone to deliberately paste it into that file. It arrives one approval at a time, and it can land in your repository as easily as anyone else's. So how does a password end up inside a list of permissions?
How one click became a Claude Code Secrets Leak
You would expect a permissions file to store permissions. According to Apiiro's report, it stores more than that: choosing don't ask again saves the exact shell command as a permanent rule, including any password you typed into the command.
Picture a quick check against a staging database with the password typed straight into the command line. You approve it once and tick the box. That entire line, password and all, now sits in settings.local.json.
The trap is the word permanent. The rule outlives your memory of the command, and the password stays attached to it. The risk is not the command you ran today; it is every command you have ever waved through with that click. If the file reaches a public repository, the passwords travel with it, unless your secret scanner catches them first.
What the secret scanners missed
Does the scanner on your pipeline catch this? Not reliably. Of the 1,122 leaking files, Apiiro reports that 215 slipped past both Gitleaks and TruffleHog. Between them, the two tools caught the rest, but on those 215 a pipeline running only those scanners would have stayed silent.
A green scan tells you the scanner found nothing. It does not tell you the file is clean. If you are cleaning up a repository today, the stronger move is to open settings.local.json yourself and read every saved rule. You recognize your own passwords on sight; a pattern matcher may not.
One researcher went looking for leaks like these months earlier. In February 2026, Niels Hofmans found similar secrets in repositories using a scanning tool he released called claudleak. You can get it from its public GitHub repository. Two honest gaps: the published material does not say whether the tool is free or what it costs to run, and it does not list an install command, an operating system, or any other requirement, so treat the repository itself as the only starting point. The main catch is scope. It is one researcher's tool, and nothing published says it catches the files Gitleaks and TruffleHog missed. Use it alongside those two scanners rather than in place of them. And note the timeline: if one person surfaced this in February, the leak was findable long before Apiiro's report.
A warning closed as not planned
How long has this been known? The bug report about plaintext credentials in the settings file was filed in August 2025, 15 months before Apiiro's report, and was auto-closed as not planned. Add Hofmans's scan in February, and the warning was public twice over. The setting still behaved the same way when Apiiro looked.
What does Anthropic say? Anthropic's Boris Cherny said on November 7 that Claude Code historically has not done secret scrubbing, meaning the tool has not been stripping secrets out of what it writes. From what has been published, it is unclear whether Anthropic will change this setting, so do not plan around a fix arriving.
Whose fault is it? On Slashdot and under the news coverage, commenters split: some blame Anthropic, others blame the developers who chose the risky setting. That split is opinion, not a finding. This channel's own view, for what it is worth: the tool wrote the file, so the tool should scrub it. Before you switch agents over this, though, look at what the alternatives do with your credentials.
Other agents, other files
Would a different agent keep you safer? Not automatically. Cursor's own documentation warns that the terminal and MCP tools its Agent uses cannot be blocked by .cursorignore. A file you believed you had fenced off is back in reach the moment the agent runs a command. And Trail of Bits found that Claude Desktop and Cursor store credentials with world-readable file permissions, which means other accounts on the same machine can read them.
GitGuardian found that AI-assisted commits leak secrets at 3.2%, more than double the baseline. That is GitGuardian's own measurement, and it covers AI-assisted commits in general rather than any one product. The problem, then, is bigger than a single button: it is how secrets reach the agent at all.
What to do this week
One click can leave your password sitting in plain text, and whoever you hold responsible, changing it is your job.
If you have ever ticked don't ask again on a command containing a secret, open settings.local.json today, delete that rule, and rotate the secret. If that file has ever been in a public repository, treat everything in it as exposed, even if your scanner came back clean. If you use Cursor or Claude Desktop, do not count on an ignore file or the app's credential storage to keep secrets private.
If you are starting a project fresh, keep secrets out of the commands you approve in the first place. Pass them in through environment variables or a secrets manager, so a saved rule holds a variable name instead of the password itself. Then the button can remember as much as it likes. Approve the command, never the password.
Our Short on this: Cursor Plugins: Turning the AI Code Editor Into an App Store for Agents.
Sources
- Apiiro finds Claude Code approvals leaking secrets on GitHub
- The State of Secrets Sprawl 2026
- Dont ask again in Claude Code leaks developer secrets
- Insecure credential storage plagues MCP
- Claude Code creates config git ignore without permission (GitHub issue 10230)
- Ignore file - Cursor Docs
- Disputed research: Claude Code CLI leaks credentials on macOS
- Leaking secrets from the Claud(e)
- Why Claude Code Is Secretly Leaking Developer Passwords
- Claude Code's Dont Ask Again Saves Passwords Your Repo Doesn't Ignore
- claudleak (GitHub repository)
- Claude Code's Dont Ask Again File Exposes Passwords and Keys in 1,122 Public Copies on GitHub (Slashdot discussion)