TRV-2026-3107Version 1 · Published

Saved · see the current record

Why this version exists

Certified into the record

The exact text we saved

This is the version exactly as it was saved, character for character. The SHA-256 hash below is a 64-character code worked out from that text. Run the same text through SHA-256 and you get the same code; change a single letter and the code comes out completely different. Each version also stores the previous version’s hash, which chains them together so no version can be swapped out quietly.

TRUVACE RECORD VERSION
record: TRV-2026-3107
version: 1
kind: certified
reason: Certified into the record
timestamp: 2026-11-24T00:02:37.635684Z
status: published
lens: p_space
sector: crime
headline: Claude Code settings.local.json Secrets: 17 months of exposure on GitHub, & Docker Hub
dek: TL;DR 31,088 secrets, 5,343 valid: GitGuardian found 31,088 distinct secrets in Claude Code’s .claude/settings.local.json on public GitHub, across 23,276 repositories, and 5,343 of them worked when we detected them. “Yes, and don’t ask ag…
gain_title: (none)
problem_title: GitGuardian's scan of public GitHub from January 2025 to November 7, 2026 found 31,088 distinct secrets in Claude Code's .claude/settings.local.json across 23,276 repositories, and 5,343 of them were valid when detected.
trace_subject: (none)
gain_reading: (none)
gain_evidence: (none)
problem_reading: GitGuardian's scan of public GitHub from January 2025 to November 7, 2026 found 31,088 distinct secrets in Claude Code's .claude/settings.local.json across 23,276 repositories, and 5,343 of them were valid when detected.
problem_evidence: GitGuardian found 31,088 distinct secrets in Claude Code’s .claude/settings.local.json on public GitHub, across 23,276 repositories, and 5,343 of them worked when we detected them.
quick_read: GitGuardian reports that Claude Code's .claude/settings.local.json file exposed 31,088 distinct secrets across 23,276 public GitHub repositories between January 2025 and November 7, 2026. Of those, 5,343 (17%) were valid when detected. The cause is the "Yes, and don't ask again" option, which saves the approved command, API key included, as an allow rule in the project file.

The exposure spread past GitHub. Public Docker Hub images carry the files across 543 image repositories and 7,625 tags, holding 613 distinct secrets, 99 of them valid. One valid Cloudflare API token appears in 559 tags of a single image, and deleting the file from the repo does not remove images already pushed.

Monthly leaks in the file peaked at 12,535 occurrences in April 2026 and fell to 959 by October, a 92% drop. GitGuardian says it does not know what changed and has not finished ruling out changes on its own side. Anthropic's Claude Code lead Boris Cherny said on Hacker News that the team is looking into the problem.
limitation: GitGuardian says it does not know why leaks fell 92% from the April 2026 peak and has not finished ruling out changes to its own detector coverage; its valid counts are floors because detectors without a checker are never counted as valid.
tag: Evidence-backed problem
key_points: settings.local.json held 71,525 occurrences across 11,336 authors; the shared settings.json held 8,271 distinct secrets, 1,283 of them valid at detection. | Bearer tokens in curl commands make up the volume (50% of sampled rules), while database and SSH credentials are the ones that work: 1,955 valid Postgres connection strings and 292 valid SSH passwords. | Generic detectors account for 63% of occurrences (44,755 of 71,525), so scanners that only match provider key formats miss most of the file; Apiiro measured that gitleaks and TruffleHog together miss one in five leaking files. | Personal email domains account for 15,993 distinct secrets (4,270 valid); corporate domains hold 5,924 (1,499 valid) and academic domains 426 (103 valid). | In 263 repositories the leaking commit carries Claude's noreply address as author, covering 406 secrets, 107 of them valid. | CLAUDE.md holds 6,155 distinct secrets, 2,537 valid, the highest validity rate of any file examined; .claude/.credentials.json appears in 371 repositories. | Cherny said Claude Code gitignores the file when it creates it, so exposed copies were likely created manually and committed; GitGuardian replies that every inspected secret sat in an allow rule of the shape the permission prompt writes.
rundown: The mechanism is simple: when a user approves a shell command containing a credential with "Yes, and don't ask again," Claude Code writes an allow rule containing the literal command string into .claude/settings.local.json. The file is kept out of git on the user's own machine, but nothing in the repository ignores it, so it can be committed from another machine, an older clone, or when already tracked.

GitGuardian scans every public commit as pushed, so it saw versions later deleted or force-pushed away. Apiiro counted 1,379 secrets in current copies plus 734 in history without testing validity; GitGuardian counted everything ever pushed and checked validity automatically. Where a check returned a verdict, 67% of occurrences in settings.local.json and 57% in settings.json were valid.

In a sample of about 3,000 occurrences, every secret sat in an allow rule or an env block, none in deny. A quarter of leaking settings.json versions point Claude Code at third-party gateways, leaking 205 valid DeepSeek keys, 62 OpenRouter keys and 50 MiniMax keys. All 30 agents' config files counted leak MCP server keys, but only settings.local.json is dominated by credentials typed into commands.

For Docker Hub, 72% of occurrences sit under /app, /workspace or /usr/src, indicating a COPY . . instruction that ships the working tree. One database password appears in 643 tags across seven image repositories. GitGuardian advises rotating every secret first, then adding the file to .gitignore and .dockerignore.
sources:
- journalism | GitGuardian Blog - Take Control of Your Secrets Security | https://blog.gitguardian.com/claude-code-settings-local-json-secrets-docker-hub/ | 2026-11-09
prev: 0000000000000000000000000000000000000000000000000000000000000000
SHA-256 hash
ea493fd79248821edde55f240bb847549407d65e51eb9af7cf937768f0f5ac5a
Previous version’s hash
0000000000000000000000000000000000000000000000000000000000000000
Check this record hasn’t been altered
How to check it yourself, without trusting this page

Download any version from /api/record/TRV-2026-3107 and hash its canonical field yourself, for example with shasum -a 256. You should get its content_hash. Each version’s text also ends with prev:and the hash of the version before it (version 1 points to 64 zeros). If anyone had changed a single character of any version after it was saved, those hashes wouldn’t line up.