Home / Companies / GitGuardian / Blog / Post Details
Content Deep Dive

Claude Code settings.local.json Secrets: 17 months of exposure on GitHub, & Docker Hub

Blog post from GitGuardian

Post Details
Company
Date Published
Author
Guillaume Valadon
Word Count
2,638
Company Posts That Month
8
Language
English
Hacker News Points
4
Post removed?
No
Summary

GitGuardian’s continuous monitoring found that Claude Code’s permission approvals can persist full command strings, including credentials, in `.claude/settings.local.json`, leading to 31,088 distinct secrets exposed across 23,276 public GitHub repositories between January 2025 and November 2026, with 5,343 verified as valid when detected. The issue occurs when users select “Yes, and don’t ask again,” causing command-based allow rules containing API keys, passwords, connection strings, or tokens to be saved locally and potentially committed despite the file being locally gitignored. Leaks peaked in April 2026 before declining 92 percent by October for reasons not yet established, while related Claude configuration files, other AI-agent files, and committed home-directory authentication files also contained exposed credentials. Secrets additionally reached public Docker Hub images because `COPY . .` includes ignored working-tree files unless `.claude/` is excluded through `.dockerignore`, leaving 99 valid secrets across image tags. The report recommends rotating all exposed credentials before removing files, scanning agent configuration and container registries as secret-bearing locations, using environment-variable references instead of literal values, applying narrow command permissions, and improving Claude Code so it does not persist approvals containing sensitive data.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Secrets Management 33 1,142 211 81 -63%
AI Agents 5 2,668 495 155 -62%
MCP 4 4,439 399 125 -63%
AI Coding Assistant 1 814 184 89 -58%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.