Skip to content
Techtember

Always First. Fast Tech News.

Claude Code running in a terminal, from Anthropic's product page.
Image: Anthropic

Opinion

Opinion: Claude Code's 'Don't Ask Again' Button Should Never Save Your Password. Anthropic Needs to Fix It, Not Close the Ticket.

Researchers found 1,122 public GitHub copies of a Claude Code settings file holding real secrets. Developers share the blame, but a convenience click that writes credentials to a project folder is a design flaw.

Los Angeles · Marcus Reid, Opinion · Nov 8 2026

LOS ANGELES - Every developer who has used an AI coding agent knows the prompt. The agent wants to run a command, you are in the middle of something, and there is a button that makes the question go away for good. In Claude Code that button reads “Yes, and don’t ask again.” According to new research, it has been quietly writing some of those developers’ passwords into a file that ends up on GitHub.

Software security company Apiiro said it found 1,122 public copies of Claude Code’s .claude/settings.local.json file that contain at least one secret, 1,379 distinct secrets in all, The Hacker News reported on Saturday. More than a third open a database directly, including 379 database passwords. The haul also includes 43 SSH logins for public servers, 42 tokens for GitHub, GitLab and npm, and 23 AWS keys. Apiiro did not test whether the secrets still work, but one company it notified confirmed its key had been live.

Screenshot: The Hacker News report on Claude Code’s settings file leak, Nov. 7, 2026 Screenshot: The Hacker News

The mechanism is mundane, which is the problem. When a user approves a command permanently, Claude Code saves an allow rule in that project file so matching commands run without asking next time. Sometimes the rule is a pattern. Sometimes it is the exact command, word for word, and if that command had a password typed into it, the password is now sitting in plain text in the project. Apiiro said it reproduced the behavior with Anthropic’s latest models, Opus 5.5 and Fable 5.1.

Anthropic did build a guardrail. The first time Claude Code writes the file inside a git repository, it adds the file to the user’s global git excludes, according to its documentation as cited in the report. That protects one person on one computer. It does nothing for a file that was already committed, and it never adds the file to the project’s own .gitignore, so the protection does not travel with the code. In 539 of the 1,105 repositories the researchers traced, a commit listing Claude as a co-author had changed the file.

Screenshot: Claude Code documentation on configuring permissions Screenshot: Anthropic

The developers involved are not blameless. Typing a database password straight into a command line has been bad practice for as long as there have been shell histories, and the fixes Apiiro lists are familiar: rotate every exposed credential first, stop tracking the file, use variables from a secrets manager, and approve patterns instead of single commands. Anyone who ships code for a living should already be doing most of that.

But tools are supposed to make the safe path the easy one, and this one does the reverse. The button exists because people are busy. A product that converts a busy person’s shortcut into a permanent plaintext record of their credentials, inside a project folder whose shared settings its own documentation invites teams to check into version control, has turned a human slip into a system default. Of 16 coding agents whose documentation the researchers compared, Claude Code is the only one confirmed to save the full approved command in a project file by default.

The paper trail makes it worse. A bug report filed on Aug. 11, 2025, described approved commands with API keys and tokens being stored word for word in that same file. An automated bot closed it as “not planned” after 60 days without activity. The researchers say the four related reports they cite were all closed by the same bot, and none got a reply from Anthropic.

The fix does not require a research breakthrough. Detect likely secrets before saving a rule and offer a pattern instead. Write the rule to a location outside the project tree by default. Add the file to the repository’s own ignore list the first time it is created. Any one of those would have kept most of these 1,379 secrets off the public internet.

AI coding agents are being sold on the promise that they remove friction. Some friction is the point. A tool that runs commands on your behalf should be the last one to forget what is in them.