News, 27 Nov 2026

Claude Code settings.local.json can save your passwords

Approve a command with a password in it and Claude Code can store the whole thing in a local file. If git tracks that file, the password goes with it.

When you click "Yes, and don't ask again" in Claude Code, the approved command gets saved to .claude/settings.local.json. The whole command. If that command has a password in it, the file has the password too.

The reel shows this happening. I paste in a database command with a password in it, click yes and don't ask again, and the full command shows up in that file, password and all.

Why it becomes a leak

That file is meant to stay out of git. That's the assumption most of us work under, and it's why a password sitting in it doesn't look like a problem.

The problem starts when git already tracks it. If the file is tracked and the repo is public, the password is public.

Researchers at Apiiro searched GitHub and found 1,379 secrets in public copies of files like this one. Production database passwords were among them. So this isn't a theoretical edge case. People have already pushed these files.

How I checked my own machine

I built a scanner. I first ran it on a repo that had the problem, and it found the password straight away.

Then I ran it on my real laptop. It came back with 22 files, one of them tracked by git, and no password this time. That's the result you want, but I wouldn't have known without looking.

You can do a rough version of the same thing by hand. Look for .claude/settings.local.json in your repos, check whether git tracks it, and open it to see whether a password is in there.

If you find something

Two steps. Remove the file from git, and change every password.

The second step matters because the first doesn't take back a password that's already written into a file in a public repo. Change every one you find, not just the one you remember.

There's also a habit worth looking at. "Don't ask again" feels like a convenience toggle, but it writes whatever command you approved into a file. If that command has a password in it, so does the file.

What to try

Search your machine for .claude/settings.local.json, then check whether git tracks each one and whether any contains a password. If you click "don't ask again" on everything Claude suggests, do this today. Send it to the friend who does the same.

  • #claudecode
  • #settingslocaljson
  • #cybersecurity
  • #github

More reels

All reels