Trusence Every claim has a source
Last updated 15 November 2026 Search Türkçe
Security

Claude Code approvals leak secrets into public GitHub repositories

Thousands of credentials have surfaced because a local settings file, meant to stay private, sometimes gets committed to public projects.

Security researchers at Apiiro report that Claude Code is exposing sensitive data in public GitHub repositories, where they found thousands of secrets such as database passwords, API tokens and root logins inside committed settings files. The root cause is that when a user picks the option to approve a shell command and never be asked again, the command is saved to a local settings file, often in full and including any credentials it contains. The file stays private on a single machine, and Anthropic's documentation says it is added to the global gitignore to prevent sharing. The problem arises when that protection fails and the file is pushed to a public repository anyway.

Why it matters

Developers who use Claude Code and push their projects to public repositories are the ones most exposed. Commands they approved once with the don't-ask-again option may have stored passwords and tokens in plain text, and the settings file can reach a public repository when the usual gitignore protection fails. Anyone whose credentials appear in those files should treat them as compromised and rotate them. The episode also shows how a convenience feature can quietly widen what gets saved to disk.

Sources · 1