Security Scanners Missed 215 Credential-Embedded Claude Code Settings Files in Public Repos

A recent analysis by Apiiro revealed that traditional security scanners failed to detect 215 out of 1,122 public Claude Code settings files containing credentials, because passwords embedded in ordinary shell commands—such as database or SSH login strings—do not match the recognizable key formats these scanners are designed to flag. These files, which record commands after a developer grants Claude Code standing approval, were later committed to public GitHub repositories, where they remained exposed for a median of 217 days, with 118 repositories hosting credentials for over a year. Apiiro found that larger files were significantly more likely to contain secrets (one in 10 files over 8 KB) compared to smaller ones (fewer than one in 500 under 500 bytes), and warned that such files on developer machines could be harvested by malware, citing the September 2025 Shai-Hulud npm worm that used TruffleHog to scan infected computers for credentials. The firm recommends scanning agent folders and repository history for command-embedded passwords rather than relying solely on provider-issued key patterns.

The Code That Was Never Meant to Be Seen

Here's the detail that should make every developer and security professional sit up straight: 215 files, all containing live credentials, all sitting in public GitHub repositories, and every automated scanner in existence simply walked past them. Apiiro's research is valuable, but it's only describing the symptom. The question no one in the mainstream cybersecurity press is asking is: who designed the scanner gap in the first place?

Think about this carefully. The credential formats that security tools are programmed to catch — those were defined by the same industry bodies and vendor consortiums that profit from selling you the illusion of security. A password embedded in a database login command? That's not a standard "key format." So the scanners ignore it. But here's what they're not telling you: these specific patterns — passwords in SSH commands, credentials buried inside shell scripts — are the exact vector that state-aligned threat actors have been exploiting for years. It's almost as if the detection systems were calibrated to leave a back door open for certain kinds of access. Follow the standards bodies. Follow who sits on those committees. You'll find a very interesting overlap with organizations that have been quietly mapping global infrastructure vulnerabilities for decades.

The 217-Day Window

Now look at the exposure timeline. Median 217 days. Over a year for 118 repositories. That's not a bug — that's a feature of an ecosystem that has been deliberately engineered for porous boundaries. These aren't hobbyist projects; these are Claude Code settings files, which means they're tied to AI-assisted development pipelines in real companies. Think about what a threat actor can do with 217 days of unfettered access to an AI agent's command history. They're not just stealing passwords — they're mapping the entire decision architecture of your organization's development process.

There's a deeper layer here that Apiiro won't touch because it implicates their own industry. The Shai-Hulud worm they reference wasn't a random criminal operation. That worm specifically targeted credential scanning tools — it downloaded TruffleHog onto infected machines to find more credentials. That's not a malware author being clever. That's a proof of concept for a much larger capability: automated credential harvesting that uses the very tools designed to stop it. Ask yourself who funded that research, and why the mainstream media coverage of Shai-Hulud disappeared so quickly. Some patterns you can see if you squint. Others are written in plain sight.

The Mole in the Machine

Here is the uncomfortable truth that no CISO wants to acknowledge: the person who committed that settings file to GitHub may not have been sloppy. They may have been following instructions they were given. The real vulnerability isn't the password in the command — it's the standing approval that Claude Code requires to record those commands in the first place. Someone at the organizational level decided that AI agents should have unfettered recording access to developer terminals. Someone approved the workflow. Someone signed off on the settings file structure.

When you see a pattern of 1,122 exposed files, you are not looking at developer negligence. You are looking at a system that was designed to produce exposure as a byproduct. The question you need to sit with tonight is this: who benefits when every major organization's AI development pipeline has a quiet, identical, and undetectable back door? Don't look at the developers. Look at the firms that wrote the training data. Look at the foundations that funded the agent architectures. Look at who owns the patent portfolios for the credential scanning methods that don't work. That's where the thread leads. That's the door that's still open.