News · DiggingBeagle record

GitGuardian finds live credentials inside saved Claude Code command approvals

GitGuardian reported 31,088 distinct secrets in public-repository Claude Code approval settings, including 5,343 still valid at detection. The observation establishes exposure, not proven account takeover.

Published
Nov 10, 2026

The report

A command approved for one coding-agent task can become a long-lived record of the credentials embedded in that command. GitGuardian's November 9 investigation inspected published Claude Code settings.local.json files and counted 31,088 distinct secrets across 23,276 public repositories. Of the exposed secrets it checked, 5,343 were still valid when detected. A separate public Docker-image scan found 613 secrets, including 99 valid at detection; those are another artifact population, not an additional count of compromised users.

Authorization remembered more than permission

Claude Code can save approvals for recurring commands. If a developer approves a command that includes a literal API token or password, the stored command pattern can retain that value. Later sharing of configuration through Git, history or image layers can publish a credential that the developer intended to use only locally.

The credential-exposure Case addresses this persistence path, rather than an alleged vulnerability in the model's reasoning. A scanner-confirmed valid credential may be immediately useful to someone who finds it, but the report does not demonstrate that those credentials were used by attackers or that every affected repository belonged to a unique person.

The distinction between a local ignore rule and artifact provenance also matters. A file absent from the current Git tree may survive in historical commits, Docker build layers or copied configuration. Deleting the current file is not equivalent to invalidating a token previously published to the internet.

Practical scope of the response

The first step for an affected installation is to identify the saved rule containing a literal secret, revoke that credential, and replace persistent command text with a method that resolves secrets at execution time. Repository history and image layers should be checked separately, because they are different distribution paths. The original GitGuardian findings give counts for observed artifacts and tested validity, not an incident registry of exploited accounts.

Research behind this