Security researchers at Apiiro say Claude Code’s stored shell-command approvals have exposed database passwords, API tokens and root credentials in public GitHub repositories.
Security researchers at Apiiro say Claude Code can unintentionally expose sensitive information when users enable “Yes, and don’t ask again” for shell commands. The approval is stored in a local settings.local.json file under the .claude directory, where the command and embedded secrets may remain in plain text.
The researchers identified more than 100,000 uploads of Claude Code local settings files in public GitHub repositories. About 1,100 files linked to 63 organizations reportedly contained highly sensitive information, including database passwords, API access tokens and root credentials.
Anthropic’s documentation says the file is added to a global gitignore configuration, but the protection does not apply at the repository level. Apiiro also says some settings changes were committed without user intervention, and 215 exposed secrets were not detected by scanners including gitleaks and TruffleHog.
Boris Cherny of the Claude Code development team said the team is examining ways to prevent the issue and that these files should not be committed to version control. He recommended Auto Mode and secret-scanning tools. Researchers said the first related bug report was filed in August 2025, while several reports later closed after 60 days without activity.