Anthropic: Claude Code's "Don't Ask Again" File Reported to Expose 1,379 Secrets on Public GitHub
Apiiro research, reported by The Hacker News, finds Claude Code's "don't ask again" file saving approved shell commands verbatim, with 1,379 secrets exposed across public GitHub repositories, including database passwords, SSH logins and AWS keys.
Anthropic's Claude Code coding assistant has been storing approved shell commands verbatim, including embedded passwords, API keys and tokens, in a project settings file that developers have pushed to public GitHub repositories, according to research by software security company Apiiro published Nov 6, 2026 and reported by The Hacker News on Nov 7, 2026. According to The Hacker News, a scan of public GitHub found 104,185 copies of the file .claude/settings.local.json across 103,617 repositories, of which 1,122 copies, about 1.1 percent, hold at least one secret, totaling a reported 1,379 distinct secrets in current files alone. The exposure is long-lived: as of Nov 2, 2026, every secret-bearing file was still on its repository's default branch, and in half of the affected repositories it had been there at least 217 days.

What was the specific vulnerability?
The vulnerability is that Claude Code saves the full text of a user-approved shell command, passwords and all, into .claude/settings.local.json when the user selects "Yes, and don't ask again," and the file's built-in protection does not prevent it from being committed. According to The Hacker News, the assistant writes the approved command word-for-word into the project settings file, including any credentials typed inline, such as database passwords after PGPASSWORD= or SSH logins after sshpass -p.
The built-in safeguard is limited in two ways. Claude Code adds the file to the user's global git excludes on one machine, but it never adds the file to the project's own .gitignore, so, as the researchers put it, the protection "does not travel with the project" and does nothing for files already committed. In 539 of 1,105 repositories traced, a commit listing Claude as a co-author changed the file, which the researchers take to mean Claude often commits the file itself. Apiiro reproduced the behavior with the latest models, Opus 5.5 and Fable 5.1. Of 16 coding agents whose documentation the researchers compared, Claude Code is the only one confirmed to save the full approved command in a project file by default.
The underlying behavior was independently reported as a bug by user asherfeldmangit in Anthropic's claude-code repository, issue #5544 on macOS 14.5, which GitHub shows was closed as not planned after 60 days of inactivity.
How was the incident detected?
The incident was detected by security researchers at Apiiro, who scanned public GitHub for copies of the settings file and disclosed their findings in a research write-up published Nov 6, 2026. According to The Hacker News's account of the research, the scan covered 104,185 copies of .claude/settings.local.json in 103,617 public repositories, plus 76,011 copies of the shared .claude/settings.json file and agent chat logs.
The coverage was reported by The Hacker News on Nov 7, 2026. The GitHub issue #5544, filed separately by a user, independently confirms the core mechanism: approved bash commands containing credentials are stored verbatim in the local settings file. The Apiiro blog page itself returned only a cookie and scripting shell when retrieved and was not independently readable, so the scan figures rest on The Hacker News's account of the research.
What is the current impact?
The current impact is live credential exposure across 63 identified organizations, mostly software companies, with no global fix reported. Among the reported 1,379 distinct secrets in current files, 379 are database passwords, meaning more than a third of the secrets open a database directly, 43 are SSH logins for public servers, 42 are tokens for GitHub, GitLab and npm, and 23 are AWS keys. The strongest cases include, per The Hacker News's account of the research, a database vendor's own admin-level cloud key and the owner password of a medical-records database.
Counting older file versions, which hold 734 more secrets across 509 repositories, 211 forks of 74 repositories carrying the same secrets as the originals, and 298 secrets in shared settings files, the reported total reaches 2,539 secrets across 1,994 repositories. Apiiro did not test whether the secrets still work; according to The Hacker News's Nov 7, 2026 report of the research, one company notified before publication confirmed its key had been live. Deletion does not undo the leak, because git history and forks persist.
Common secret scanners miss these files: of the 1,122 files holding a secret, gitleaks flagged 564 and TruffleHog 643, and neither flagged 215, with most misses being passwords typed inside commands.
What are the next steps?
The next steps, per Apiiro, are to rotate first and clean up second: "rotate first: change every password, token, and key the file has ever held, then clean up." The researchers advise searching the organization for both settings files including git history, running git rm --cached .claude/settings.local.json, adding the file to the repository's .gitignore, deleting secret-bearing rules locally, and referencing secrets as variables from a secrets manager, for example $DB_URL.
They also recommend approving command patterns such as Bash(npm run:*) instead of single commands, so that credentials are never embedded in an approval that gets saved. No patch or product change from Anthropic has been reported, and the related GitHub issue was closed as not planned.
By the numbers
Source snapshot
