What happened
Claude Code’s persistent permission option saves an allow rule to .claude/settings.local.json; that rule can include the full command string, including a key supplied in a command header (blog.gitguardian.com). A .gitignore exclusion does not keep a file out of a Docker image: .dockerignore must exclude it separately (blog.gitguardian.com). Separately, Stony Brook researchers published 300 honeypot images across eight public registries over four months, planting AWS, OpenAI and Anthropic API keys alongside decoy SSH keys and database credentials (blog.gitguardian.com).
Across public Docker Hub images, GitGuardian counted 109,284 occurrences of settings.local.json and 29,613 of settings.json; 72% of the files were under /app, /workspace or /usr/src (blog.gitguardian.com). In the separate honeypot experiment, the fastest planted AWS key was used 7.86 seconds after its image went live; all 100 AWS keys in the first round were used within 15 minutes, with a median 51.19 seconds to a first API call (blog.gitguardian.com). The honeypot images were pulled more than 75,000 times, and the AWS keys received over 140,000 API calls from about 5,000 unique IP addresses (blog.gitguardian.com). On GitHub, GitGuardian counted over 89,000 Claude Code settings file instances between January 2025 and early November 2026, finding 31,088 distinct secrets across 23,276 repositories, of which 5,343 were valid at detection (blog.gitguardian.com). Generic secret detections accounted for 63% of settings.local.json occurrences (blog.gitguardian.com).
What the archive adds
An earlier New Runtime note reported the same GitHub and Docker Hub secret counts (earlier New Runtime note). The settings-file exposure had also been flagged in a Claude Code bug report as early as August 2025 (earlier report).
Why it matters
For builders, exclude .claude/ from both .dockerignore and .gitignore, scan every image layer before pushing, and rotate credentials that may have shipped. Removing a secret-bearing allow rule means editing the file or running /permissions. Cleaning a working tree is not enough for images already pushed: their layers can retain secrets.
Limits and uncertainty
The researchers rarely observed anyone running the honeypot images; GitGuardian says scanners most likely unpacked layers or queried the registry API, so that explanation is an inference (blog.gitguardian.com). The researchers found no evidence that one operator coordinated the scanners they called ContainerBots (blog.gitguardian.com). GitGuardian sells secret-scanning and agent-protection products discussed in the report.
Reader takeaway
GitGuardian reported 613 distinct secrets in Claude Code settings files found in public Docker Hub images; 99 were valid. A separate Stony Brook honeypot experiment found planted AWS keys were used quickly, but its results do not establish how representative the detected image leaks are or who operated the scanners.
Open question
How representative are the detected public images of the wider population of agent-assisted builds?