Sciencepulse

Claude Code Is Leaking Secrets Onto GitHub

Security·November 10, 2026

Claude Code Is Leaking Secrets Onto GitHub

Developers who use Anthropic's Claude Code, the AI coding agent that works from the terminal, may be publishing sensitive credentials without realizing it. According to a new report, the problem starts with a routine permission prompt. When Claude Code asks whether it may take a certain action, a user who selects "Do not ask again" stops getting that check for similar actions. The outcome, as described, is that passwords, API keys and other secrets end up shared on GitHub.

The risk is serious because exposed credentials are one of the most common ways code projects get compromised. Automated bots constantly scan public GitHub activity for keys and tokens, and they often find them within minutes of a push. Deleting a commit after the fact does not reliably undo the damage, since the secret may already have been copied. Anyone whose key appeared in a public repository should treat it as compromised and replace it.

Developers who use Claude Code should start by checking their recent repositories for stray secrets. Make sure files such as .env, along with config files that hold keys, are listed in .gitignore before any commit runs. GitHub's secret scanning and push protection can catch many common credential formats, and they are worth enabling if they are not already on. It also makes sense to think twice before choosing "Do not ask again" for commands that touch git, file uploads or network access, since those are the actions that move code outside your machine.

The episode also points to a broader tension in AI agent tools. Fewer confirmation prompts make them faster to use, but each prompt the user skips is one less chance to catch a mistake. The source summary does not say how Anthropic has responded or whether a fix is planned, so readers should watch for an official update or guidance from the company. Until then, the safest approach is to keep credentials out of project folders altogether and to review what an agent is about to commit before it does.

Reporting based on an external source.