{"version":1,"type":"story","url":"https://digestai.news/story/claude-code-settings-files-leak-secrets-on-public-github-repos","json":"https://digestai.news/story/claude-code-settings-files-leak-secrets-on-public-github-repos.json","markdown":"https://digestai.news/story/claude-code-settings-files-leak-secrets-on-public-github-repos.md","slug":"claude-code-settings-files-leak-secrets-on-public-github-repos","headline":"Claude Code settings files leak secrets on public GitHub repos","summary":"AI security researchers at Apiiro have identified a significant security flaw in Anthropic's Claude Code. The tool stores user approvals for automated shell commands in a local file named `.claude/settings.local.json`. When users select \"Yes, and don't ask again\" for a command, the full command text, including any embedded sensitive data like API tokens or database passwords, is saved to this file.\n\nAlthough Anthropic's documentation states that this file should be added to the global `.gitignore` list to prevent public sharing, this protection does not apply at the repository level. Consequently, if a developer clones a repository to another machine or converts a folder into a new repository, the settings file can be accidentally committed and pushed to public GitHub instances. Apiiro notes that Claude Code often commits these changes automatically without explicit user input for each commit.\n\nThe researchers found over 100,000 instances of this local settings file uploaded to public GitHub repositories. Of these, approximately 1,100 files from 63 different organizations contained active secrets, including private keys and root logins. Even after the original files are removed, the sensitive data may persist in forks of the affected projects, posing a continued risk to the involved organizations.","keyPoints":["Apiiro found over 100,000 Claude Code settings files uploaded to public GitHub repositories.","About 1,100 files from 63 organizations contained secrets like API tokens and database passwords.","The global .gitignore setting does not prevent accidental commits at the repository level."],"whyItMatters":"This vulnerability exposes sensitive credentials for hundreds of organizations, highlighting a gap in how AI coding assistants handle local configuration files and version control integration.","category":{"slug":"models","name":"Generative AI & Models","url":"https://digestai.news/category/models"},"entities":{"companies":["Anthropic","Apiiro","GitHub"],"models":["Claude Code"],"people":[]},"firstPublishedAt":"2026-11-09T17:24:26Z","updatedAt":"2026-11-10T10:46:00Z","sourceCount":4,"hasPrimarySource":false,"sources":[{"outlet":"Ars Technica AI","title":"Claude Code is accidentally exposing secrets all over GitHub","url":"https://arstechnica.com/ai/2026/11/claude-code-settings-files-expose-thousands-of-secrets-on-github","publishedAt":"2026-11-09T17:24:26Z","type":"press","primary":false,"lead":true},{"outlet":"darkreading.com","title":"AI Coding Agents Leak Thousands of Secrets to GitHub","url":"https://darkreading.com/cyber-risk/ai-coding-agents-leak-secrets-github","publishedAt":"2026-11-10T10:46:00Z","type":"press","primary":false,"lead":false},{"outlet":"techspot.com","title":"Claude Code's \"don't ask again\" button is leaking passwords and API keys to public GitHub repos","url":"https://techspot.com/news/114500-claude-code-dont-ask-again-button-leaking-passwords.html","publishedAt":"2026-11-10T04:03:00Z","type":"press","primary":false,"lead":false},{"outlet":"tbreak.com","title":"Claude Code’s “don’t ask again” button leaked secrets to GitHub","url":"https://tbreak.com/claude-code-secrets-github","publishedAt":"2026-11-10T01:44:00Z","type":"press","primary":false,"lead":false}],"sourceNotes":null,"discussions":[{"site":"Hacker News","url":"https://news.ycombinator.com/item?id=50448813","points":5}],"thread":{"title":"Claude Code Security Flaws and Data Leaks","url":"https://digestai.news/thread/github-flags-9-fake-claude-codex-npm-packages","storyCount":5},"cite":{"text":"Digest AI, \"Claude Code settings files leak secrets on public GitHub repos\", 9 November 2026, https://digestai.news/story/claude-code-settings-files-leak-secrets-on-public-github-repos","publisher":"Digest AI","title":"Claude Code settings files leak secrets on public GitHub repos","datePublished":"2026-11-09T17:24:26Z","url":"https://digestai.news/story/claude-code-settings-files-leak-secrets-on-public-github-repos"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}