Executive Summary
Claude Code project settings files reportedly exposed passwords and API keys when users approved commands for future use, with 1,122 public copies identified on GitHub. Organizations using AI coding assistants should treat agent-generated or agent-managed configuration files as potential secret-storage locations.
What Happened
Passwords and API keys that developers typed into commands they approved in Claude Code are sitting in public GitHub repositories, where anyone can read them. When a user selects "Yes, and don't ask again," Anthropic's AI coding assistant can save the command, word-for-word, including the secret, in a project settings file. Software security company Apiiro said yesterday that 1,122 public
Affected Products
- Claude Code
- GitHub
Vulnerability / Attack Technique
Credential exposure through persistent agent configuration
Technical Mechanism
When a user selects “Yes, and don’t ask again,” Claude Code can save the approved command word-for-word in a project settings file. If the command contains a password or API key, the secret is stored in that file and may become publicly readable when the file is committed to a GitHub repository.
AI Security Category
LLM02:2025 Sensitive Information Disclosure
Relevant Frameworks
RealGround Analysis
AI coding agents can create or modify persistent project files, so their approval and memory mechanisms may become unintended secret repositories. Teams running AI agents should include agent-created configuration files in secret-management, repository-scanning, and access-review controls.
Recommended Controls
- Block or redact passwords, API keys, and other secret patterns before commands are persisted in agent settings files.
- Use pre-commit and continuous repository scanning to detect exposed credentials in GitHub repositories.
- Store credentials in approved secret managers and reference environment variables rather than embedding secrets in commands or configuration files.
- Restrict public repository access and immediately revoke and rotate any credentials found in exposed files.
- Audit AI coding-assistant approval and persistence settings, including options that suppress future approval prompts.
Related RealGround Service
AI Security Readiness Assessment · or start with the free AI Agent Security Scanner.
Sources
thehackernews.com: https://thehackernews.com/2026/11/claude-codes-dont-ask-again-file.html
Summary and analysis written by RealGround from the source above; last updated 2026-11-07.
