Blog · · 2 min read

Apiiro: 1,122 public Claude Code settings files held secrets

Apiiro found 1,122 public copies of Claude Code's settings.local.json holding at least one secret, 1,379 in all, saved when developers approved commands with "don't ask again".

SecurityGovernance

On November 7 The Hacker News reported research from Apiiro on .claude/settings.local.json, the project file where Claude Code records commands a developer approves with "Yes, and don't ask again"1. Apiiro found 104,185 public copies in 103,617 GitHub repositories, and 1,122 of them held at least one secret, 1,379 distinct secrets in total1. Of 16 coding agents Apiiro compared, Claude Code is the only one confirmed to save the full approved command in a project file by default1.

iTnews reports that more than a third of what Apiiro found opens a database directly, including 379 database passwords and 122 Supabase service role keys, alongside 43 SSH logins and 23 AWS keys, across 63 organizations2. GBHackers notes that Apiiro did not test whether the credentials still work3, though one notified company confirmed its key had been live1. Boris Cherny, head of Claude Code, told Hacker News readers the team is looking into basic secret scanning, and argued the exposed copies were likely checked in manually because Claude Code gitignores the file on creation2.

The approval prompt is meant to be a control. The convenient answer turns it into a credential store that sits in the repository. Standard scanners did not close the gap: gitleaks flagged 564 of the 1,122 files, TruffleHog flagged 643, and 215 were missed by both1. Older file versions held 734 more secrets absent from any current copy1, so deleting the file today does not remove the exposure.

For data teams, 379 of the leaked secrets were database passwords2. A credential pasted into an agent session to run one query outlives the session and travels with the project. That argues for short lived, scoped credentials for any agent that touches the warehouse, a separate identity per agent so query logs show who ran what, and scanning that covers agent config folders and git history, not only source files.

One step this week: search your repositories, including history, for .claude/settings.local.json and .claude/settings.json. Rotate every credential you find before removing the file, then add it to the project's own .gitignore.

Sources
  1. The Hacker News · Nov 7, 2026
    Claude Code's "Don't Ask Again" File Exposes Passwords and Keys in 1,122 Public Copies on GitHub
  2. iTnews · Nov 9, 2026
    "Don't ask again" in Anthropic's Claude Code leaks developer secrets
  3. GBHackers · Nov 7, 2026
    Claude Code's "Don't Ask Again" Feature Exposes 2,539 Secrets Across 1,994 GitHub Repositories