Claude Code “Don’t Ask Again” Feature Leaks Passwords and API Keys in 1,122 Public GitHub Repositories
What Happened – Anthropic’s AI‑powered coding assistant, Claude Code, offers a “Yes, and don’t ask again” option that records the exact command a developer approves, including any embedded secrets. When that option is selected, Claude Code writes the command verbatim into a project‑settings file stored alongside the code.
Software‑security firm Apiiro discovered that 1,122 public GitHub repositories contain copies of that settings file, each exposing passwords, API keys, and other credentials that developers typed into Claude Code prompts. The exposed secrets range from cloud‑provider access keys (AWS, Azure), database passwords, to third‑party service tokens (GitHub, Slack).
The leak was first identified on 7 November 2026 by Apiiro’s automated secret‑scanning platform, which flagged the recurring settings file pattern across multiple public repos. Apiiro notified Anthropic, and the company confirmed that the “don’t ask again” workflow does indeed persist the full command line, without redaction, in a plain‑text JSON file named claude_code_settings.json (the exact name varies by integration).
Anthropic’s internal review found that the feature was designed for convenience—allowing developers to skip repetitive confirmation dialogs—but the implementation omitted any sanitisation step for credential‑type arguments. Because the file is stored in the same directory that developers typically commit to version control, any repository that is later made public automatically publishes the embedded secrets.
The affected repositories span a variety of industries, including fintech, health‑tech, and open‑source tooling projects. In most cases the leaked credentials were tied to development‑ or test‑environment accounts, but several instances included production‑level keys, raising the risk of unauthorized access to live services.
Anthropic has issued an advisory urging users to disable the “don’t ask again” option, rotate any exposed credentials, and remove the offending files from public history. The company also announced that a patch will be released to automatically redact credential‑type arguments before persisting the command.
Apiiro recommends that organizations using Claude Code conduct an immediate sweep of their codebases with a secret‑scanning tool, revoke and rotate any compromised secrets, and enforce a policy that disallows committing configuration files containing raw commands.
The incident underscores a broader challenge for AI‑assisted development tools: balancing productivity shortcuts with secure handling of sensitive data. As AI coding assistants become more embedded in CI/CD pipelines, the need for built‑in secret‑management controls and continuous monitoring grows sharply.
Why It Matters for Trust & Control Assurance – The exposure tests the control objective of secure credential handling and secret management. A single mis‑implemented feature can invalidate evidence of compliance across multiple frameworks that require protection of authentication material.
Who Is Affected – Software development teams, DevOps engineers, and any organization that integrates Claude Code into its development workflow—particularly those in regulated sectors (finance, healthcare, SaaS).
Recommended Actions
- Immediate secret rotation – Revoke and regenerate any passwords, API keys, or tokens found in the leaked files.
- Remove exposed files – Purge
claude_code_settings.json(or equivalent) from all public repositories and rewrite Git history to eliminate residual references. - Disable the risky feature – Turn off “Yes, and don’t ask again” in Claude Code settings until the sanitisation patch is deployed.
- Implement continuous secret scanning – Deploy tools (e.g., Apiiro, GitGuardian) that scan commits in real time for credential patterns.
- Map to control objectives – Document the incident response steps against the VCF control area of “Credential Protection and Secret Management” and align with the relevant framework (e.g., NIST CSF 2.0 Identify → Asset Management, Protect → Data Security).
- Engage vendor – Request a timeline for Anthropic’s patch and obtain assurance that future releases include credential‑redaction safeguards.
Technical Notes –
- Feature behavior: When a developer selects “Yes, and don’t ask again,” Claude Code stores the full command string—including any
--password,--api-key, or similar flags—in a plain‑text JSON file under the project’s.anthropic/directory. - Exposure vector: The file is not automatically excluded from version control; developers inadvertently commit it, making it publicly accessible on GitHub.
- Detected by: Apiiro’s secret‑scanning engine, which matches known credential patterns (e.g.,
AKIA[0-9A-Z]{16}for AWS keys). - Scope: 1,122 public repositories, spanning at least 18 distinct GitHub organizations. No evidence that private repositories were similarly affected, though the risk remains.
- Remediation status: Anthropic is developing a patch to strip credential arguments before persisting commands; rollout expected in early December 2026.