Claude Code's "Don't Ask Again" Setting Is Leaking Secrets to GitHub
Security·November 9, 2026

Anthropic's Claude Code, a command-line tool that lets the model read projects, run commands, and make changes on a developer's behalf, is at the center of a growing security problem. Reports describe credentials such as passwords and API keys ending up in public GitHub repositories, where anyone can find and copy them.
The trigger appears to be a common convenience option. When Claude Code asks permission to run an action, users can choose a "do not ask again" response so the tool stops interrupting them with the same question. That is useful for routine work, but it also means a later action that the user would have rejected if asked can run without a second look. Pushing code or files to a remote repository is one such action, and a file containing a secret that happens to be in the project folder can travel along with it.
The problem is not that the agent is trying to leak data. It is that a standing approval covers more than the user may have pictured when they clicked it, and secrets often sit in places that developers forget, such as local configuration files or environment files that were never added to a .gitignore rule. Once a credential is pushed, deleting the commit does not fully solve the problem, since copies may already have been cloned or scraped by automated tools that watch GitHub for exposed keys.
Developers who use Claude Code should review their permission settings and revoke any blanket approvals they no longer need. Rotating any credential that may have been exposed is the safest step, and it is worth checking repository history, not just the latest version of files. Teams should also make sure secret-scanning tools are enabled and that sensitive files are excluded before an AI agent gets access to a project.
The episode is a reminder that AI coding tools inherit the permissions of the person running them. Convenience features that reduce friction can also reduce the number of chances a user has to catch a mistake, so the trade-off deserves more attention than a single click on a prompt.
Reporting based on an external source.