# Claude Code settings files expose thousands of secrets on public GitHub

> Original title: Claude Code is accidentally exposing secrets all over GitHub

- Source: Ars Technica · AI
- Published: 2026-11-09T17:24:26.000Z
- Bad Influence: https://badinfluence.news/items/txenqgq94z1di4cm5o7eofhm2
- Original: https://arstechnica.com/ai/2026/11/claude-code-settings-files-expose-thousands-of-secrets-on-github/

## Summary

AI security researchers at Apiiro found thousands of secrets, including database passwords, API tokens, and root logins, in Claude Code settings files embedded in public GitHub repositories. The leak occurs when a user chooses "Yes, and don't ask again" for a shell command, which Claude Code stores in .claude/settings.local.json, sometimes with the sensitive command text unmasked. Anthropic's documentation says this file is added to the global .gitignore list, which normally keeps it from being shared publicly.
