Claude Code settings files expose secrets on GitHub
According to Ars Technica, security researchers found Claude Code settings files on public GitHub pages that contained secrets such as passwords and API tokens. The files can store approved shell commands, including sensitive details. Anthropic’s docs say the file is meant to stay off public repos.
According to Ars Technica, researchers at Apiiro found Claude Code settings files on public GitHub pages. Those files had exposed secrets, including database passwords, API tokens, and root logins. The leak stems from the way Claude Code stores a user’s approval to run automated shell commands. When a user chooses "Yes, and don’t ask again," that choice is stored in a local settings file, Ars Technica reports. The command is often written out in full, including any sensitive information in it.
That file is not a major risk if it stays on a local machine, the report says. Anthropic’s Claude Code documentation notes that the settings file is added to a developer’s global .gitignore list. That usually keeps it from being shared publicly. Ars Technica reports that this gitignore setting is not always reflected at the repository level. The file can be uploaded by accident if a repo is cloned to another machine or a folder later becomes a repository. In many cases, Claude Code itself will commit changes to the settings file without the user’s input, Apiiro wrote, according to the report.
Apiiro’s researchers found more than 100,000 cases in which the local settings file had been uploaded to a public GitHub repository. Of those, only about 1,100 files from 63 organizations contained secrets, Ars Technica reports. The secrets included public API tokens, database passwords, or private keys. Even after the files are discovered and removed, the secrets can persist in forks of the original project. That can happen if a GitHub user is not careful.
Ars Technica frames the issue as a partial oversight in how settings files are handled, not as an accusation against a named individual. The cited report quotes Anthropic’s documentation on the gitignore practice. It does not include a further comment from the company on Apiiro’s findings or on the exposed secrets.
Only Ars Technica has reported this so far; NewsHabit hasn't seen independent confirmation.
What we know: Ars Technica reports that Apiiro found more than 100,000 public Claude Code settings files on GitHub. About 1,100 of them held secrets from 63 organizations.
What we don't know: Only Ars Technica has reported this so far; NewsHabit hasn't seen independent confirmation.
Where outlets agree Ars Technica reports that Claude Code settings files have exposed thousands of secrets after being uploaded to public GitHub repositories.
Where they differ Anthropic’s documentation, as described in the report, says the settings file is added to a global gitignore list, and the Ars Technica account does not include a further company comment on the exposed secrets.