(🇪🇸 Leer la versión en español aquí)
Terminal coding agents save you keystrokes until they automate something nobody wants automated: persisting plaintext production credentials inside project config files. Telemetry published this week by GitGuardian — following Apiiro's November 5 disclosure detailed via Aviatrix — puts hard numbers on the Claude Code .claude/settings.local.json leak: 31,088 distinct secrets across 23,276 public GitHub repositories, including 5,343 valid, live credentials at the time of detection.
Even worse, Git wasn't the end of the pipeline. Because COPY . . in a Dockerfile copies the entire working directory regardless of .git/info/exclude, 613 secrets (99 live/valid) ended up baked directly inside public Docker Hub image layers — including a single valid Cloudflare API token replicated across 559 public Docker image tags.
Why “Yes, and Don’t Ask Again” Saved Plaintext Keys to Disk
Nothing here requires an exotic zero-day. It is pure, predictable permission-UX leakage:
- Agent suggests a credentialed command: While debugging an n8n instance, cloud API, or PostgreSQL database, Claude Code generates a
curlor CLI command embedding a live token or password. - Literal string allowlisting: Clicking "Yes, and don't ask again" tells Claude Code to store a permanent allow rule in
.claude/settings.local.jsoncontaining the verbatim command string — plaintext credential included. - Broken ignore boundaries (
GitandDocker): When.claude/settings.local.jsonwas missing from repo-level.gitignoreand.dockerignorefiles,git add .anddocker buildpackaged production secrets straight into public registries.
| Leak Telemetry Dimension | Verified Scope | Production Reality | Primary Source |
|---|---|---|---|
| Public GitHub exposure | 31,088 secrets across 23,276 repos | 5,343 credentials verified active/valid when scanned | GitGuardian |
| Initial Apiiro enterprise sample | 2,539 secrets across ~2,000 repos (63 orgs) | Exposed production DB passwords, cloud keys & root SSH keys | Aviatrix / Apiiro |
Docker Hub layer leaks (COPY . .) |
613 secrets (99 valid) | Single live Cloudflare API token shipped in 559 Docker tags | GitGuardian |
| Monthly leak trend (2026) | Peaked Apr 2026 (12,535) -> 959 in Oct (-92%) | New leaks dropped sharply, yet legacy Git history & image layers stay exposed | GitGuardian |

Four Guardrails Every Team Using CLI Coding Agents Needs Today
While GitGuardian's data shows monthly new occurrences fell 92% between April and October 2026, any agentic CLI (Claude Code, Codex, Cursor) with shell access triggers the exact same failure mode if you don't enforce boundaries:
- Enforce
.claude/inside BOTH.gitignoreand.dockerignore: Keeping local ignores in.git/info/excludedoes nothing to stopCOPY . .during container builds. - Never allowlist commands containing literal secrets: Pass credentials via runtime environment variable expansion (
$API_TOKEN) or short-lived OIDC/secret-manager wrappers, never inline literals. - Rotate anything that ever touched
.claude/settings.local.json: Deleting the file in a later commit won't erase Git history or cached Docker Hub layers. When rotating burned DB passwords and API secrets, generate unbiased high-entropy keys offline in your browser with zero server uploads via our Password Entropy & WebCrypto Generator in Syncroma Tools.
Visuals and infographics designed by Syncroma Studio.
Sistemas reales, sin humo corporativo Real systems, zero corporate hype
Recibe los análisis a fondo sobre arquitectura, consumo de recursos y computación de bajo nivel directamente en tu bandeja de entrada. Get deep-dive software architecture, resource consumption metrics, and low-level computing essays delivered straight to your inbox.
Suscribirse a Syncroma Subscribe to Syncroma