# PSA: "yes, and don't ask again" saves the exact command, secrets included, into .claude/settings.local.json. 1,122 of those files are public on github — retained record

> Retained reddit record from reddit:ClaudeCode.

Canonical: https://highsignal.app/data/records/11efdcd2f2c14e90

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:ClaudeCode)  published 2026-11-08 15:18 ingested 2026-11-09 02:37

[original source ↗](https://www.reddit.com/r/ClaudeCode/comments/1xr0s2i/psa_yes_and_dont_ask_again_saves_the_exact/)

## retained text



```
apiiro scanned public github and found 1,122 files where claude code's saved permission rules contain passwords and api keys. it's #6 on hacker news right now.

the headline is a bit misleading, so here's what actually happens:

1. claude asks to run something like `psql postgres://admin:hunter2@db...` or `curl -H "Authorization: Bearer sk-..."`
2. u click "yes, and don't ask again"
3. that exact command, secret included, gets saved as an allow rule in `.claude/settings.local.json`
4. that file gets committed and pushed to a public repo

boris from the claude code team replied on HN: settings.local.json is meant to stay local and claude code gitignores it automatically when it creates the file. so the leaked ones were mostly created or committed by hand (or a blanket `git add .`). he also said they're looking at secret scrubbing, and recommends auto mode over hand-kept allow lists.

check urs in 2 minutes:
- `git ls-files | grep -E '\.claude/settings(\.local)?\.json'` in each repo. if settings.local.json shows up, it's committed
- open both settings files and search the allow list for `://`, `Bearer`, `token`, `key`, `password`
- if anything real is in there, rotate it. deleting the file now doesn't help, it's still in git history
- turn on github secret scanning + push protection, it would have blocked most of these pushes

worth noting settings.json (the shared one) is supposed to be committed, so a secret that ended up in an allow rule there is public by design. keep secrets in env vars and never type them into a command u approve.

source in comments
```



document fetched 2026-11-09 00:35 · canonical https://reddit.com/r/ClaudeCode/comments/1xr0s2i/psa_yes_and_dont_ask_again_saves_the_exact
