Claude Code’s recent implementation of a “Don’t Ask Again” option stores supplied secrets in a local claude/settings.local.json file. Apiiro’s analysis shows that these files, along with shared settings.json and chat transcript artifacts, have been committed to public repositories, revealing 1,122 secrets in the local file and an additional 1,160 secrets in git history and related artifacts.
Root cause and evidence
The feature’s design writes credentials directly to the developer’s workspace without automatic exclusion from version control. Apiiro identified the leakage by scanning public repos for the specific file patterns and counting the exposed secrets.
Operational impact
Any pipeline that pulls code from these repositories now risks propagating compromised keys, tokens, or passwords. Continuous integration jobs that reuse the checked‑in configuration may inadvertently authenticate with leaked credentials, leading to unauthorized access to downstream services.
Mitigation considerations
- Audit existing repositories for
claude/settings.local.json,settings.json, and embedded chat transcripts; remove any discovered secrets. - Rotate all credentials that appeared in the findings to invalidate the leaked values.
- Update .gitignore rules to exclude Claude Code’s local configuration files from version control.
- Adopt a secret‑management workflow that injects credentials at runtime rather than persisting them in source‑controlled files.
- Integrate secret‑scanning tools into pull‑request validation to catch accidental commits early.
Related CloudNinjas coverage: AI engineering.
What This Means For Practitioners
Teams using Claude Code should treat its local configuration files as sensitive assets and prevent them from entering source control. Regular repository hygiene, credential rotation, and a shift toward external secret stores are immediate steps to reduce exposure risk.

