Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files a...
HN Best 30 @best30
Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files apiiro.com · 219 points · 146 comments · HN thread
The article could not be read, so this summary is based on the title and the discussion.
TL;DR Apiiro reports that Claude Code's "Don't Ask Again" approval feature saves approved shell commands into .claude/settings.local.json, and when users commit that file, plaintext passwords end up in repositories; the team found 1,122 public GitHub files containing such secrets. The article itself could not be read, so this summary relies on the title, URL and comment thread, including the article's figures as quoted by commenters.
- Claude Code's 'Don't Ask Again' option writes approved command patterns, sometimes including secrets typed inline, into .claude/settings.local.json inside the project.
- Claude Code adds settings.local.json to the user's global git ignore rather than the repo's .gitignore, so a second machine or a directory copy can commit it.
- Per a commenter quoting the article, in 539 of 1,105 traced repos a commit co-authored by Claude itself changed the file, across models from Sonnet 4.5 to Opus 5.5.
- The headline says 1,122 public files; a commenter notes these are in public repos and that private repos still spread the secret to everyone with access.
- Anthropic's Boris (bcherny) replied that Claude Code has not historically scrubbed secrets, that the file is meant to stay local, and that the team is prototyping fixes; he recommends auto mode and platform secret scanning.
Discussion The thread is long and mostly argumentative. It starts with the Claude Code team responding to the report, then splits into a debate over whether the fault lies with the tool (defaults, approval UX, secret handling) or with users who commit local files without review. A large side debate covers whether auto mode is actually safer than manual approval, whether sandboxing is the real answer, and approval fatigue. Several commenters are sharply critical of Anthropic and of the team asking the community for ideas, while others push back that the headline overstates the problem. The mood is skeptical and combative, with a noticeable amount of frustration about AI tools generally.
- Users who commit local settings are at fault; the file is meant to stay local (many): Many commenters argue settings.local.json is named and documented as local, so committing it is a review failure. They note that committing secrets was a problem long before AI agents and that a clone-time problem is not what the article describes.
- Tool should not write secrets to disk or should scrub them (many): Several argue that writing credentials into project files is a bad default regardless of intent, and that the tool should avoid persisting secrets or warn about them. Others note that many package managers also write keys to plaintext files.
- Auto mode is not a real security boundary (many): Critics say auto mode offers no defined threat model or guarantees and cannot be compared to sandboxing. They argue sandboxes and least-privilege credentials are needed, and that a model classifier can be influenced by attacker input.
- Auto mode is safer than manual approval in practice (some): The Claude Code team and some users argue humans get approval-fatigued and approve dangerous commands, so an automated classifier does better. Anthropic cites an order-of-magnitude improvement, and a user describes auto mode catching risky operations.
- Secrets should be kept out of the agent entirely (some): Commenters suggest password managers with on-demand biometric prompts, agent-specific secret stores, or egress proxies that inject real credentials, so the agent never sees raw values. Some describe running agents in ephemeral VMs with restricted API proxies.
- Headline and article framing are misleading (a few): One commenter says pressing Don't Ask Again does not expose passwords by itself; it is the combination of committed local settings and inline secrets. Others question whether 'public' means repository visibility.
- Anthropic's response and attitude are the real problem (a few): Some commenters see the 'ideas welcome' request and the 'user error' framing as dismissive, and point to unreliable permission hooks and auto mode over-refusing safe commands in operations work.
Links from the comments
- AWS tool that blocks committing secrets, suggested as a free scanner
- Transparent encryption for selected files in git, suggested for private files in repos
- Anthropic's open source agent-agnostic sandbox, mentioned by bcherny
- Claude Code settings documentation cited for the local-file guidance
- GitHub's secret scanning plans, recommended by bcherny
#claudeCode #secrets #security #aiAgents #gitHub #sandboxing