Security

Apiiro says Claude Code’s ‘don’t ask again’ approvals saved passwords and keys in settings files found in 1,122 public GitHub copies, while an Anthropic engineer is reported to say the file is meant to stay local

Apiiro found secrets in 1,122 of 104,185 public Claude Code settings.local.json copies. Anthropic reportedly says it should stay local. Rotate exposed secrets.

By ·

Disclosure: Anthropic makes Claude, which helps draft articles on this site. Security firm Apiiro reported on November 5, 2026, and The Hacker News covered on November 7, that choosing “Yes, and don’t ask again” in Claude Code can save the approved command, word for word, in a project file named .claude/settings.local.json. When the command contained a password or key, the secret was saved with it. Apiiro found 1,122 public copies of that file holding at least one secret, out of 104,185 it scanned, so about 1.1 percent. If you use Claude Code, check your repositories and rotate any exposed secret.

The essentials

A disputed point: is the file protected from commits?

Sources disagree on how the file is kept out of Git. The Hacker News says Claude Code never adds it to the project’s own .gitignore. Hackerposts says it is added to the user’s global git excludes on first write, which would not protect a teammate’s clone. Cherny’s reported answer is that it is gitignored when created. We could not test these claims, and we did not read Apiiro’s write-up, which Hackerposts says was not publicly reachable at publication.

What to do if you use Claude Code

Check .claude/settings.local.json and .claude/settings.json in your repositories and their Git history, since deleting a file does not remove old versions or forks. Treat any secret found there as compromised and rotate it first. Avoid typing credentials inline in commands you approve; use environment variables or a secrets manager instead. This is general hygiene, not a statement that every Claude Code user is affected.

What is not established

Summary table

Summary table
PointWhat is stated as of November 7, 2026Source
Reported byApiiro (Nov. 5–6); The Hacker News (Nov. 7)The Hacker News
Files scanned104,185 public copies, 103,617 repositoriesThe Hacker News
Files with a secret1,122 (about 1.1%), 1,379 distinct secretsThe Hacker News
Wider total2,539 secrets, 1,994 repositories, 63 organizationsGBHackers
Anthropic’s reported viewFile meant to stay local; checked in manuallySaaSCity (relaying Hacker News)

FAQ

Does Claude Code leak secrets on its own?

Per Apiiro, secrets typed inside commands you approve with “don’t ask again” can be saved in a local file; they only become public if that file is committed and pushed.

What should I do first?

Rotate any credential that may have been in an approved command, then check your repositories and Git history for the file.

Is 1,122 the total number of leaks?

It is the number of public file copies with secrets. The wider study count is 2,539 secrets in 1,994 repositories.

Method and limits

Sources checked on November 8, 2026. Disclosure: Anthropic makes Claude, which helps draft articles on this site. We read The Hacker News, GBHackers, Hackerposts and SaaSCity as search extracts; Apiiro’s write-up and the Hacker News thread were not read directly. Findings are Apiiro’s. Not security or legal advice.

Sources

Spotted an error in this article? Report it · Our corrections policy

OrigoTech logo

New: the app iPhone & iPad

OrigoTech is now an iPhone and iPad app

Read the articles natively, with “New” markers on unread ones, local search and offline reading of what you have already loaded. Free, no account, iOS 17 or later; ads appear between articles.

Rekha icon: a house drawn in a single stroke

From the same author Self-promotion

An Eulerian path, drawn with your finger

Rekha, the iPhone game by OrigoTech's author: connect every dot in a single stroke without tracing the same link twice, across 500 drawings that are all solvable.

The OrigoTech newsletter

A sourced weekly digest of AI tool news.

Read next