Skip to content
ViqusViqus
Navigate
Company
Blog
About Us
Contact
System Status
Enter Viqus Hub

Claude Code's "Don't Ask Again" Feature Leaks Credentials Across Public Repos

Claude Code Secret Management Credential Leakage Git Security Agentic AI Security Secret Scanning
November 22, 2026
Source: InfoQ AI

This summary and analysis were generated by AI from the original article at InfoQ AI and may contain errors (how Viqus works). Read the source for full details.

Viqus Verdict Logo Viqus Verdict Logo 6
Convenience Feature, Costly Leak
Media Hype 4/10
Real Impact 6/10

Article Summary

Agentic security firm Apiiro reports that Anthropic's Claude Code exposes developer secrets through its "Don't Ask Again" approval feature. When a developer approves a shell command permanently, Claude Code saves it as a rule in .claude/settings.local.json, and that rule can contain embedded credentials such as passwords, cloud API keys and npm tokens. Apiiro identified 1,122 secrets in these local files and another 1,160 in git history, in the shared settings.json, and in agent transcripts stored in repositories, affecting 63 organizations. The global gitignore rule Claude Code relies on does not cover cloned repos, folders later turned into repos, or files already committed, and in some cases Claude Code itself committed the file. GitGuardian later reported 31,088 secrets in such files on public GitHub, 5,343 still valid, plus 613 in Docker Hub images. Generic scanners like gitleaks and TruffleHog missed many secrets because they were embedded in shell commands. Recommended fixes include untracking the file, adding it to .gitignore, rotating exposed credentials, pruning rules containing secrets, and using environment variables.

Key Points

  • Claude Code saves permanently approved shell commands to .claude/settings.local.json, where embedded passwords and API tokens can end up exposed.
  • Apiiro found 1,122 secrets in local settings files and 1,160 more in git history, shared settings, and agent transcripts, affecting 63 organizations.
  • GitGuardian found 31,088 secrets in such files on public GitHub, with 5,343 still valid, and generic secret scanners missed many because the secrets sat inside shell commands.

Why It Matters

This is a concrete security flaw in a widely used coding agent, and it shows that agent-generated config and logs can silently leak credentials in ways standard secret scanners do not detect. It matters to any team using AI coding tools, and it is likely to push vendors and security tooling to treat agent artifacts as sensitive. The impact is significant for developer security practice but limited to how one product handles local permissions, so it is not a structural shift for the industry.


You might also be interested in