Case · DiggingBeagle record

Claude Code remembered approvals copied secrets into public settings files

Apiiro traced probable secrets in public repositories to complete shell commands saved as approval rules. The scan documents disclosure, not a count of confirmed account takeovers or currently valid credentials.

Public disclosure: Nov 5, 2026

Scope

Vulnerability reported in a controlled research or disclosure setting. Exact prerequisites, versions and absence of documented exploitation must be preserved.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade B
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

The cited first-party advisory or research establishes the stated mechanism only within its documented conditions. No unrelated production compromise, extended victim scope, financial harm or universal mitigation is inferred.

Assessed Nov 9, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    A developer runs a command containing a literal API key or secret and approves recurring agent execution.

  2. 02

    The agent stores the entire accepted command in .claude/settings.local.json instead of removing the secret from its permission rule.

  3. 03

    The settings file becomes tracked, copied or otherwise exposed when local exclude rules are absent or bypassed.

Claims & evidence

CLM-CLAUDE-APPROVAL-CONDITIONSClaude Code can persist a complete approved shell command when the user selects a remember-approval option, potentially copying literal credentials into project-local settings.supported

Basis: reported finding

Link to claim
CLM-CLAUDE-APPROVAL-SECRETS-SCANApiiro reported 2,539 probable secrets across 1,994 public repositories with saved Claude Code approval commands; the scan is a classification result and not proof that every credential remains usable.supported

Basis: reported finding

Link to claim
CLM-ENR231-CLAUDE-SCAN-DENOMINATORApiiro reports scanning 104,185 public copies of the project-local settings file, with 1,122 containing at least one real secret; the wider set it describes totals 2,539 secrets in 1,994 public repositories.supported

Basis: reported finding

Link to claim

Implications

Executable permissions can retain sensitive command arguments, even when the original .env or secret manager file is protected.

Controls and mitigations

  • Remove embedded secret literals from approval rules, sanitize stored approvals, audit existing tracked project settings and rotate exposed credentials.

Unknowns and contradictions

  • The report did not use captured credentials; one notified organization confirmed that a sampled key had been live. No broad downstream account compromise established.

Sources and citation

Material revision history

  1. Nov 9, 2026 · Published version · first publication · revision 233