Anthropic's Claude Code Exposes Developer Secrets on GitHub via 'Don't Ask Again' Feature
A recent report by software security company Apiiro has revealed a significant security flaw in Anthropic's Claude Code AI assistant: the "Yes, and don't ask again" feature, intended to simplify developer interactions, inadvertently causes sensitive information like passwords and API keys to be written in plain text into a `.claude/settings.local.json` file. This file, when committed to version control and pushed to public GitHub repositories, makes these credentials publicly accessible. Apiiro's research identified 1,122 public copies of this file containing at least one secret, with some dating back over 200 days.
This discovery is critical for any organization utilizing AI coding assistants, highlighting a dangerous intersection of developer convenience and security negligence. The core issue lies in the implicit trust placed in automated tools and the potential for seemingly innocuous features to create substantial attack surfaces. For practitioners, this means that the very tools meant to accelerate development can, if not carefully managed, become conduits for data breaches and intellectual property theft. The widespread adoption of AI in development, coupled with a lack of stringent security guardrails, amplifies the potential impact of such vulnerabilities.
This incident fits into a broader, well-established trend in cloud, DevOps, and AI security: the challenge of securing rapidly evolving technologies that prioritize speed and ease of use over inherent security. Similar issues have plagued Kubernetes configurations, where default settings are often not secure, leading to misconfigurations that become prime targets for attackers. The proliferation of open-source dependencies, third-party APIs, and AI-assisted code generation has dramatically expanded the software supply chain's attack surface, making it a preferred vector for sophisticated threat actors. The problem is exacerbated by the fact that many organizations lack comprehensive AI governance policies, leading to untracked and unsecured AI usage.
In practice, this means development teams must immediately audit their repositories for instances of `.claude/settings.local.json` and any similar configuration files from other AI coding assistants. All exposed credentials must be rotated without delay. Beyond immediate remediation, organizations should implement stringent secret management policies, ensuring that sensitive data is never hardcoded or stored in plain text within development environments or version control. This includes integrating robust secret scanning into CI/CD pipelines, treating AI agent folders as holding secrets, and enforcing `gitignore` rules for such files across the organization. Furthermore, practitioners should adopt a "zero-trust" mindset when it comes to AI tools, understanding that while they offer immense productivity gains, they also introduce new security considerations that require proactive and continuous vigilance.
Read original source