Claude Code's 'Don't Ask Again' feature stored credentials in local settings and exposed secrets
Agentic security firm Apiiro found Claude Code saved approved shell commands as permanent rules in a local settings file (.claude/settings.local.json), which sometimes contained embedded credentials and was committed or left in repos and images; Apiiro identified thousands of exposed secrets and GitGuardian later reported 31,088 occurrences on public GitHub (5,343 still valid) plus 613 in Docker Hub images. Apiiro recommends untracking and .gitignoring the file, rotating affected credentials, deleting rules that contain secrets, and avoiding typing secrets directly into commands.