Skip to content
MediumNewsLLM-specific

Claude Code’s ‘don’t ask again’ button has a secrets-spilling problem

Published
Record updated
View JSON

Summary

GitGuardian found 31,088 distinct secrets in Claude Code's .claude/settings.local.json files across 23,276 public GitHub repositories, with 5343 still valid when detected. Claude Code saves the full command string, credentials included, when a developer selects "Yes, and don't ask again," and Docker images built with COPY .. also carried such files, with 613 distinct secrets found in public Docker Hub images.

Mitigation

Developers must rotate exposed credentials, remove sensitive configuration files from both Git and Docker build contexts, and check previously published images for lingering secrets. GitGuardian recommends treating AI coding assistant configuration files as potential secret-bearing assets, scanning them alongside conventional environment files, and using environment variables rather than hardcoding credentials into commands.