Claude Code permission files leak thousands of secrets from public repositories and Docker images
- Severity
- High
- Sources
- 1
What happened
GitGuardian reports 31,088 distinct secrets in .claude/settings.local.json across 23,276 public GitHub repositories, 5,343 valid at detection, with 67% of verifiable occurrences live. Allow rules saved via "Yes, and don't ask again" store full command strings, so inline API keys, SSH passwords and connection strings persist. Docker Hub exposure: 613 secrets across 543 image repositories, 99 valid, reached via broad COPY instructions without .dockerignore exclusions. No CVE assigned in the article. Defenders should rotate exposed credentials, purge the file from Git history and Docker build contexts, audit published images, and scan AI assistant config files.
For security analysts · Written by AI from 1 source · Wrong?
What to do
- Rotate any credentials that appear in Claude Code settings.local.json files, since removing the file from a repository does not revoke them.
- Remove .claude/settings.local.json from Git and from Docker build contexts, and exclude it through .dockerignore.
- Check previously published container images for leftover secrets and rebuild them without the file.
- Use environment variables instead of hardcoding credentials into commands.
Written by AI from the sources, checked against them
Full story timeline · 1 update
Who reported · 1 outlet
Who and what is in it
Companies
Products