Live3 today

ToolsNov 8, 2026, 21:26 UTC

Claude Code's “Don't ask again” stored secrets in 1,122 public GitHub files

Approved shell commands can be saved verbatim in a local settings file, including passwords and API keys typed inline.

A broken digital lock emits a stream of glowing code onto a large blueprint, illuminated by a celestial forge.
Illustration: Toolcall

Claude Code’s “Yes, and don’t ask again” permission option can save passwords, tokens and API keys in plain text when they are embedded in an approved shell command. Security researchers at Apiiro found 1,122 public copies of the affected settings file containing at least one likely real secret, according to reporting by The Hacker News.

When a developer permanently approves a command, Claude Code records an allow rule in .claude/settings.local.json inside the project. The rule may be a general pattern, but it can also be the exact command shown in the prompt. If that command includes a database password, authorization header or API token, the credential becomes part of the saved rule. The file is intended to remain local, yet many copies were committed to public GitHub repositories.

Apiiro reportedly scanned more than 104,000 public copies of the file and found 1,379 distinct secrets in current versions of 1,122 files. Historical Git revisions can preserve removed credentials as well. The research describes an unsafe interaction between a documented convenience feature and ordinary source-control mistakes, not evidence that Claude Code itself uploaded the files.

Developers who use Claude Code should search repositories and Git history for .claude/settings.local.json, rotate any exposed credentials before deleting them, remove the file from tracking and add it to .gitignore. Secrets should be passed through environment variables or a secrets manager rather than typed directly into commands that may become reusable permission rules.

Sources

  1. 1The Hacker Newsthehackernews.com
  2. 2Cloud Security Alliance research notelabs.cloudsecurityalliance.org
  3. 3Anthropic Claude Code permissionsdocs.claude.com

In this story

Share

← Back to feed