Home · Posts · AI news
AI news

Claude Code "don't ask again" saved passwords in a plain settings file

By wiredsmarter · · 2 min read

Claude Code "don't ask again" saved passwords in a plain settings file

When you click "Yes, and don't ask again" in Claude Code, it saves the command you approved as a permanent rule. If that command had a password or token in it, the password is saved too, in plain text, in a file called `.claude/settings.local.json`. A scan of public GitHub by the security firm Apiiro, reported this month, found more than a thousand of those files online with real passwords and keys inside.

The headlines say Claude Code leaked the passwords. That isn't quite what happened. The file is meant to stay on your computer, and people pushed it to public repositories themselves.

What Apiiro found

Apiiro counted 104,185 public copies of `.claude/settings.local.json` in 103,617 repositories. Of those, 1,122 files held at least one real password or key, 1,379 in all. They included 379 database passwords, 122 Supabase service-role keys, 43 SSH logins, 42 GitHub, GitLab or npm tokens and 23 AWS keys. Counting older commits and other files, Apiiro found 2,539 of them across 1,994 repositories.

What Claude Code's docs say about the file

The permissions page says that when you choose "Yes, and don't ask again", Claude Code "saves the rule to `.claude/settings.local.json` at the root of the git repository." The settings page calls it "your personal overrides", for you "in this one project only", and "gitignored when Claude Code saves a setting to it". If you create the file by hand, the docs say to add it to your `.gitignore` yourself.

The Claude Code team said on November 7 that the file isn't meant for source control and that they are looking at a basic check for keys in these files.

How to check your projects

  1. In each project, look for `.claude/settings.local.json` in what you've committed (`git ls-files .claude`).
  2. If it's there, remove it from Git with `git rm --cached .claude/settings.local.json` and add the path to `.gitignore`.
  3. If the repository was ever public, change every password, token or key that appears in the file. Deleting the file doesn't remove it from the Git history.
  4. Avoid typing passwords or keys into commands you approve. If your Git host can scan for leaked keys, turn that on.

FAQ

Did Claude Code upload my passwords to GitHub?

No. It saved them in a local file. They reached GitHub only where someone committed that file and pushed it.

Where does "don't ask again" save the rule?

In `.claude/settings.local.json` at the root of your Git repository.

Is deleting the file enough?

Not if it was pushed. Change the password or key, because old commits still contain it.

Sources

Tools in this article

Claude No commission

Anthropic's AI assistant: chat, files, artifacts and the Claude Code app. Free plan; paid plans start with Pro.

Open Claude

We earn nothing from these links. All tools

Making something to sell?

Our guide shows how to make and sell one small PDF with AI, with the real numbers. Chapter 1 is free.

Follow wiredsmarter for the next one

Read next

Checked against official sources on Nov 9, 2026. The character in our posts is made with AI; the text is written with AI help and checked by hand rules.