Zhidaily AI · Intelligence · Daily
Zhidaily
Issue 11 · November 10, 2026 · Tue
Today's stories
12 stories · 6 companies
Home / November 10, 2026 / Claude Code settings files are writing secrets into public GitHub repos
← Back
News Safety / Agents · Anthropic Score72

Claude Code settings files are writing secrets into public GitHub repos

In brief
Apiiro found thousands of secrets in public GitHub repositories, coming from Claude Code's local settings files. Developers who approved commands with "don't ask again" should check their repositories.
Ars Technica · AI Kyle Orland · RSS · arstechnica.com
Nov 10 · 01:24 Read the original ↗
01Summary

Researchers at security firm Apiiro found thousands of secrets in public GitHub repositories, including database passwords, API tokens and root login credentials, coming from Claude Code's .claude/settings.local.json file. According to Ars Technica, the problem lies in the command approval mechanism: after a user chooses "Yes, and don't ask again", that rule is written into the local settings file, and sometimes what is stored is the full command text rather than a matching pattern, so any sensitive information in the command is written in too. Anthropic's documentation says the file is added to the developer's global .gitignore, which usually keeps it from becoming public; but if someone bypasses that or it does not take effect, the file gets committed along with the repository. While the file stays on the local machine the risk is limited; the leak happens after it is pushed to a public repository.

02Background

By default Claude Code asks the user before running most shell commands; when the user chooses "Yes, and don't ask again", that approval is written into the project's .claude/settings.local.json as an allow rule. Anthropic's documentation says the file is added to the global .gitignore, but a daily report on 7 November said Apiiro had already found 1,122 files containing such credentials in public GitHub repositories. Boris, an engineer on the Claude Code team, responded at the time that the file was supposed to stay local only, that the repositories involved were committed manually by users, and acknowledged that no secret cleanup had been done before.

03Impact

Developers using Claude Code should immediately check whether their local .claude/settings.local.json records full commands containing passwords or tokens, and confirm that it is in fact excluded by .gitignore. Repositories that have already committed the file need their history cleaned and the affected secrets rotated, because deleting the latest commit does not erase the content from Git history.