Claude Code 'Don't Ask Again' Exposes 1,122 Public GitHub Copies

Introduction
Anthropic's Claude Code, an AI-powered coding assistant, introduced a feature called "Don't Ask Again" that allows developers to save commands and their associated secrets. When a user selects the option to save a command without prompting for confirmation, the assistant captures the entire command word-for-word, including any passwords or API keys the developer typed into the terminal. This seemingly convenient feature has inadvertently created a large-scale security vulnerability. Software security firm Apiiro reported that 1,122 public copies of these compromised files exist on GitHub, where anyone with internet access can read the exposed credentials. The incident highlights a critical gap in how AI coding assistants handle user input and data persistence, raising serious concerns for organizations that integrate such tools into their development workflows.
The Mechanism of the Exposure
At its core, the "Don't Ask Again" functionality works by recording the exact command entered by the developer. In many cases, developers use this feature to automate repetitive tasks, such as deploying code, running tests, or interacting with external services. The assistant then stores these commands in a project settings file, often in a format that includes the secret values in plain text. Because the commands are saved exactly as typed, any password, API key, or authentication token becomes permanently visible in the file. Once these files are pushed to public repositories, they are accessible to anyone scanning GitHub, including malicious actors, competitors, or even internal employees who may not have intended to share the credentials. The scale of the issue is notable: 1,122 public copies of affected files have been identified, suggesting that the feature may be applied broadly across the developer community without proper safeguards.
Why This Matters for Security Teams
The exposure of passwords and API keys in public repositories represents a direct breach of the principle of least privilege and confidentiality. Even if an organization believes its repositories are private, the "Don't Ask Again" feature bypasses this protection by writing sensitive data to a location that is accessible to the public. Attackers can use these leaked credentials to impersonate developers, gain access to private services, or launch further attacks against the organization. The risk is compounded by the fact that many developers may not be aware of the feature or its security implications. When a tool designed to boost productivity inadvertently creates a security hole, it underscores the need for organizations to thoroughly evaluate AI coding assistants before adoption and to implement strict access controls and data handling policies.
Grivyonx Expert Analysis
Risk Assessment
From a security perspective, this incident demonstrates how the automation of developer workflows can introduce hidden vulnerabilities. The "Don't Ask Again" feature is a prime example of a convenience feature that trades security for speed. Without proper input sanitization and secure storage mechanisms, such features can become vectors for credential leakage. The fact that 1,122 public copies exist means that the risk is already materialized and potentially exploitable by anyone with a basic understanding of GitHub and AI coding tools.
Organizations that rely on AI coding assistants for CI/CD pipelines, testing, or deployment automation must take immediate steps to review and potentially disable this feature for sensitive projects. It is also critical to ensure that any secrets generated or stored by these tools are never written to persistent storage that is publicly accessible. The incident serves as a reminder that AI integration in software development is not without risk, and that security considerations must be baked into the design and deployment process from the outset.
Practical Mitigation Strategies
To protect against similar exposures, teams should adopt a layered approach to AI-assisted coding workflows. First, disable the "Don't Ask Again" feature for projects handling sensitive data or containing credentials. Second, ensure that any secrets are never written to files that are committed to public repositories. Instead, use environment variables or dedicated secret management systems that are not accessible via public Git URLs. Third, conduct a thorough audit of all AI coding assistants currently in use and evaluate their security features. Organizations should also implement code scanning tools that can detect the presence of hardcoded secrets in repositories. Finally, provide training to developers about the risks of auto-saved commands and the importance of manually reviewing any saved configurations before deployment. By combining technical controls with awareness programs, teams can significantly reduce the likelihood of credential leakage through AI features.
Conclusion
The "Don't Ask Again" feature in Claude Code has inadvertently exposed thousands of passwords and API keys across public GitHub repositories, creating a substantial security risk for developers and organizations. This incident underscores the need for careful evaluation of AI coding assistants and the implementation of robust security practices to prevent similar breaches in the future. As AI continues to transform software development, organizations must remain vigilant and adopt a proactive stance toward AI security, ensuring that the benefits of automation are not outweighed by the costs of credential exposure. Grivyonx Technologies, through its AI automation and cloud security services, is committed to helping enterprises navigate these challenges and build more secure development environments.
- #AI security
- #cloud security
- #GitHub secrets
- #code management
- #password exposure
- #AI coding assistant
- #enterprise security
- #DevSecOps



