Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

Apiiro's cover illustration for its research, titled Coding Agents Copy Your Secrets to a Hidden File, Thousands are on GitHub, showing a robot clicking a Don't ask again button that sends a settings.local.json file holding a key along a conveyor into a public repo.
Image: Apiiro (fair use), cover of its November 2026 public GitHub census of coding-agent settings files.

Response

A Claude Code Shortcut Is Writing Database Passwords and Cloud Keys Into a Settings File That Ends Up on Public GitHub, Apiiro Finds, and Common Secret Scanners Miss About One in Five, as Sysdig Warns Skipped Approvals Are Becoming Permanent

Apiiro counted 104,185 public copies of Claude Code's local permissions file and found real credentials in 1,122 of them, tied to 63 organizations. Sysdig, drawing on the same research and its own agent telemetry, says security teams should treat agent folders like .env files, rotate what has leaked and stop trusting an agent's own log of what it touched.

Noah Park, ResponseNew York6 min read

NEW YORK - A convenience button in Anthropic's Claude Code has quietly turned thousands of developers' approved shell commands, passwords included, into files that sit in public GitHub repositories, according to research from the application security firm Apiiro that the cloud security company Sysdig revisited this week.

The mechanism is mundane. When Claude Code proposes a shell command and the developer picks "Yes, and don't ask again," the tool saves that exact command as a permission rule in .claude/settings.local.json inside the project folder. If the command carried a database password, an API token or an SSH login, the secret is now stored in plain text in that file. Apiiro researchers Shmulik Cohen and Matan Giladi found that the file is often committed with the rest of the code.

"Nothing in the repo marks that file as private, so it gets committed with the rest of the code," Apiiro wrote.

What Apiiro found

Apiiro said it searched public GitHub between Nov. 1 and Nov. 3 and found 104,185 copies of .claude/settings.local.json in 103,617 repositories. Of those, 1,122 files, about 1.1 percent, held what it classed as a real secret: a key in a known provider format, or a password or token sitting next to a public host. Together they held 1,379 distinct secrets, 636 provider keys and 743 passwords or tokens.

The Who is exposed section of Apiiro's research, saying 63 organizations hold a real secret in a public allowlist and listing examples including a database vendor's own cloud API key, a production Azure Postgres password, a Square production access token, an npm token and the owner password for a medical-records app's cloud Postgres database.
Image: Apiiro (fair use), the Who is exposed section of its research.

More than a third of the secrets open a database directly, according to the firm: 379 database passwords and 122 Supabase service-role keys, plus 103 Supabase account tokens that control every project in an account. It also counted 43 SSH logins for public servers, some of them root passwords in sshpass commands, 42 GitHub, GitLab and npm tokens, 23 AWS keys and six private keys. Sixty-three organizations were affected, Apiiro said, ranging from student groups to startups, software agencies and a few established vendors whose own demo and workshop repositories leaked a database vendor's cloud API key with manage access, a production Azure Postgres password and a Square production token, among others. One organization confirmed its key had been live, the firm said. Apiiro said it reported each organization case to its owner on Nov. 2 and 3 and notified Anthropic.

Deleting the file does not end the exposure. In the median repository with a real secret, the file had been committed 217 days before Apiiro looked, and in 118 repositories more than a year earlier. Apiiro found 211 forks of 74 repositories carrying the same secrets, and 734 more secrets, in 509 repositories, that survive only in the file's git history. Counting history, the shared .claude/settings.json file that teams commit on purpose and agent chat transcripts, the firm put the total at 2,539 distinct real secrets in 1,994 repositories.

The agent often does the committing itself. In 539 of the 1,105 repositories with a real secret that Apiiro traced, a commit co-authored by Claude changed the file. Apiiro said Claude Code adds the file to a developer's global gitignore when it creates it inside a git repository, but that protection does not travel with the project, and does not cover a folder that becomes a repository later, a clone on another machine or a file that was already committed.

Why scanners missed it

For security teams, the most uncomfortable number concerns their own tooling. Apiiro ran gitleaks and TruffleHog over all 104,185 files. Of the 1,122 files holding a real secret, gitleaks flagged 564 and TruffleHog 643. The two together missed 215.

The gap, according to Apiiro, is passwords embedded in commands. Scanners look for key formats such as a provider prefix followed by a long random string. A password typed after PGPASSWORD=, sshpass -p or mysql -p, or a bearer token in a curl header, looks like an ordinary word in an ordinary command line.

The Not just one file section of Apiiro's research, a table showing real secrets in 298 shared .claude/settings.json files, 120 agent chat transcript files in 87 repos, agent memory files in 9 repos, 33 handoff and deploy notes and VS Code Copilot auto-approve settings in 9 repos.
Image: Apiiro (fair use), the Not just one file section of its research.

The same pattern shows up wherever an agent records what it ran. Apiiro found real secrets in 298 shared settings.json files, 120 agent chat transcript files across 87 repositories, agent memory files in nine repositories, 33 handoff and deploy notes and VS Code Copilot auto-approve settings in nine repositories. It also found the local settings file in 126 of 31,053 Hugging Face Spaces it checked.

Boris Cherny, Anthropic's head of Claude Code, responded on Hacker News after the research was published. According to Apiiro, which quoted his comments, he said the team was "looking into what we can do to prevent this," including "making sure auto mode catches this, building in basic secret scanning," and that he believed the exposed copies had been created manually and checked in.

Sysdig: approvals are becoming policy

Sysdig's Crystal Morin, writing on Nov. 25, tied the leak to a broader habit of skipping agent approvals. In a separate Sysdig study of agent activity on more than 300 devices at one organization over one month, which the company cautioned was not a representative sample, 10 percent of sessions ran in what developers call YOLO mode, with permission prompts turned off for at least one call. In 98 percent of those cases, prompts stayed off for the rest of the session.

The YOLO mode trades oversight for speed section of Sysdig's Nov. 25, 2026, post, reporting that 10 percent of sessions ran in YOLO mode, 61 percent of tool calls ran without a human approving them and only 19 percent ran in default mode.
Image: Sysdig (fair use), from its Nov. 25, 2026, post on Claude Code approval shortcuts.

Across tool calls, Sysdig said, 61 percent ran without a human approving them, 9 percent in YOLO mode and 52 percent in auto mode, where a classifier screens each call instead of a person. Only 19 percent ran in default mode. Morin wrote that the saved allow rule is worse in one respect: it removes the human "indefinitely," turning a rushed click into a standing approval on disk.

Sysdig also found a logging gap that matters for investigations. When an agent read a credential file, the agent's own log had no record of the read 82 percent of the time, rising to 95 percent when the agent binary itself did the reading. The kernel, Sysdig said, saw the read every time.

What response teams should do now

Apiiro and Sysdig offered overlapping guidance. For security and incident response teams, it comes down to finding the files, assuming exposure and closing the path:

  • Search every GitHub organization, including forks and git history, for .claude/settings.local.json and .claude/settings.json, and treat each hit as public.
  • Rotate every credential a file has ever held, starting with passwords and tokens paired with public hosts. Removing the file does not clear history, forks or clones.
  • Treat agent folders and files, including .claude/, .cursor/, .gemini/, .specstory/ and agent memory files, as secret-bearing, like .env, on laptops as well as in repositories, since malicious packages such as the Shai-Hulud npm worm have already swept developer machines for secrets, according to Apiiro.
  • Add those paths to pre-commit and CI secret scanning, including history, and tune scanners for passwords inside commands, not only provider key formats.
  • Add .claude/settings.local.json to repository-level .gitignore templates and push protection rather than relying on each developer's global settings.
  • Give agents scoped, short-lived credentials, and base audit and detection on runtime telemetry the agent cannot edit rather than on the agent's own log.
  • Decide centrally who may use "don't ask again" rules and YOLO mode at all, and where, such as sandboxes with throwaway credentials.

Apiiro's advice to developers is simpler: stop typing secrets into commands, reference them as environment variables from a secrets manager so the saved rule records $DB_URL rather than the password, and approve command patterns instead of literal command lines.

About the Author

Noah Park

Noah Park covers incident response, containment, and blue-team operations for SOCtember from New York.

Related stories

Response desk