Claude Code's "Don't Ask Again" Feature Exposes Passwords in 1,122 Public GitHub Files: Developer Security Checklist
Cybersecurity firm Apiiro discovered over 1,100 public GitHub repositories exposing active database credentials, cloud secrets, and API tokens stored in Claude Code's local settings. Here is what happened and how to secure your repo.
Yubico YubiKey 5C NFC & GL.iNet Beryl AX Encrypted Router (Zero-Trust Security Kit)
- ✓ Hardware FIDO2 keys eliminate password-based credential theft even if environment variables leak into Git
- ✓ Encrypted travel router prevents MITM interception and DNS snooping when coding on untrusted networks
A widespread credential leak has emerged across public GitHub repositories as developers increasingly adopt autonomous AI coding agents. According to a new investigation published by cybersecurity research firm Apiiro, more than 1,122 public GitHub files were found exposing live passwords, database connection strings, and cloud API tokens. The root cause? Claude Code's convenient "Don't Ask Again" permission setting, which saves approved shell commands into unignored local workspace configuration files.
How Claude Code Saves Permissions and Why It Leaks
When developers use Anthropic's CLI-based coding assistant Claude Code to run automated terminal commands, the tool prompts for confirmation before executing actions. To save time and minimize interruptions, developers frequently choose the "Yes, and don't ask again" option. Behind the scenes, Claude Code persists these approved commands into two local JSON files:
.claude/settings.json— Project-level command whitelist and workspace configuration..claude/settings.local.json— User-specific local environment settings.
If a developer previously ran commands containing plaintext credentials—such as curl -H 'Authorization: Bearer sk-ant-...', psql postgres://user:password@host/db, or docker login -u user -p secret—Claude Code writes the entire command string with the raw secret into these JSON files. When developers run git add . without a properly configured .gitignore, these sensitive files are committed and pushed directly to public GitHub repositories.
What Apiiro's Telemetry Discovered
Apiiro's security scanner identified critical risks across open-source and commercial codebases alike:
- 1,122 Exposed Configuration Files: Hundreds of repositories contained public
.claude/settings.jsonfiles containing raw command histories. - High-Privilege Cloud Secrets: Leaked tokens included AWS access keys, OpenAI API secrets, production PostgreSQL passwords, and private SSH deployment keys.
- The "Vibe Coding" Blindspot: Fast-moving developers relying entirely on AI automation frequently overlook the underlying files generated in their local workspaces.
Developer & Team Security Checklist
To guarantee that your local AI coding tools never leak sensitive infrastructure credentials, implement the following immediate safeguards:
- Add .claude to Global .gitignore: Add
.claude/to your global Git ignore list (~/.gitignore_global) and repository root.gitignoreso local settings are never tracked by Git. - Audit Your GitHub Organization: Search your GitHub organization for
path:.claude/settings.jsonto immediately identify and rotate any accidentally committed credentials. - Enforce Phishing-Proof Hardware MFA: Protect your primary cloud accounts with a physical cryptographic key such as the Yubico YubiKey 5C NFC on Amazon so that leaked passwords alone cannot grant console access.
- Encrypt Outbound Remote Traffic: When developing on remote Wi-Fi, route connections through a hardware WireGuard tunnel like the GL.iNet Beryl AX Encrypted Travel Router on Amazon with DNS-over-HTTPS enabled.
- Use Ephemeral Environment Variables: Never pass static secrets as inline CLI parameters. Store them in system credential vaults or separate
.envfiles excluded from version control.
Our Take
Autonomous AI coding agents drastically accelerate software development, but convenience features like "Don't Ask Again" create dangerous blind spots. Treat all agent-generated configuration files as high-risk artifacts and maintain strict Git hygiene across every project.
Yubico YubiKey 5C NFC & GL.iNet Beryl AX Encrypted Router (Zero-Trust Security Kit)
What We Like (Pros)
- + Hardware FIDO2 keys eliminate password-based credential theft even if environment variables leak into Git
- + Encrypted travel router prevents MITM interception and DNS snooping when coding on untrusted networks
- + Provides physical hardware-level boundaries that protect dev infrastructure against autonomous tool misconfigurations
Things to Consider (Cons)
- − Always store a secondary backup YubiKey in a secure offsite location for emergency access recovery
Top Picks & Technical Comparison
⚡ Reader Pulse: Should advanced AI models and voice synthesis weights be open-source or strictly cloud-restricted?
Watch Our 8-Minute Investigations & Daily AI Shorts
Subscribe to @overheadclick on YouTube for deep-dive technical benchmarks, hardware teardowns, and daily AI safety breakdowns. Follow our Facebook page for instant alerts and community discussions.
Compare Specs & Use 5 Free Creator Micro-Tools on LinkDirectoryCenter.com
View the quick-reference directory card for this topic, compare alternatives side-by-side, or launch our free AI Token Cost Calculator, UTM Link Builder, and SEO Meta Checker.
Creator Merch & Tech Gift Studio
Contrast-verified official Amazon Merch apparel & accessories — direct Prime delivery.
🧥 Oversized T-Shirt
Prompt Builder Workflow Test Ship Mode Automation Maker Lab
☕ Coffee Mug
Prompt Test Ship AI Engineer Software Developer Coding
🥤 Insulated Tumbler
Tung Tung Sahur Italian Brainrot Meme Weird Humor
☕ Coffee Mug
Garlic Planting Fall Garden Grower Season Planner
Continue Reading Next
⭐ 9.8/10
World Labs Atlas vs Higgsfield Seedance 2.5 (2026): 3D Gaussian Splat World Models vs 4K AI Video & Best Creator Studio Stack
⭐ 9.7/10
Insta360 Link 2 vs Elgato Facecam Pro (2026): Best 4K AI Webcam for Creators, Remote Engineers & Desk Setups
⭐ 9.8/10