Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files a...

@best

Claude Code's "Don't Ask Again" exposes passwords in 1,122 public GitHub files apiiro.com · 56 points · 48 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' permission option writes approved commands into .claude/settings.local.json, and that 1,122 public GitHub files found by its scan contain plaintext passwords or keys. The article itself could not be read, so this summary relies on the title and the thread, where the authors' claims about the methodology were checked against the scan details commenters quoted.

  • Claude Code's 'yes, don't ask again' approval saves the exact command, including any inline secret, to .claude/settings.local.json.
  • Per commenters quoting the piece, the file is added to the user's global gitignore rather than the repo's .gitignore, so clones and second machines commit it.
  • Per commenters quoting the piece, 539 of 1,105 traced repos with a real secret had a commit co-authored by Claude that changed the file, across models from Sonnet 4.5 to Opus 5.5.
  • The author's scan found 1,122 files in public repos; the headline's 'exposes passwords' means the secret is committed, not that the button itself leaks.
  • Boris Cherny of the Claude Code team says the file is meant to stay local, Claude Code historically did no secret scrubbing, and the team is prototyping fixes.

Discussion The thread is a mix of security concern and skepticism about the headline. Anthropic's Boris Cherny joins early to say the file is meant to stay local, that secret scanning should be on regardless of agent, and that the team is looking at fixes. Much of the discussion then shifts to whether auto mode is actually safer than manual permission rules, with several users reporting failures and over-caution. Other commenters argue the real problem is ordinary developers committing secrets, which predates AI tools, and a few dismiss the piece as repetitive or AI-written. The mood is skeptical and argumentative, with some frustration at the headline and at a few comments being auto-flagged.

  • Committing secrets is a user mistake, not an AI problem (many): Many commenters say developers have leaked secrets in repos for years and that the settings file is documented as local-only. They see the headline as overblown and note the fault lies with people who commit it.
  • Claude Code should prevent or scrub secrets itself (many): Several argue the tool wrote the secret into a project file and co-authored commits that changed it, so the harness should guard against this. Cherny acknowledges it and says prototypes are underway.
  • Auto mode is not clearly safer than manual approval (some): Some question the evidence, noting the comparison is only against the manual system and that auto mode has no defined threat model. Others report auto mode blocking safe CI or read-only commands, while some recount it deleting backups.
  • Permission rules and fine-grained sandboxing are the real fix (some): Commenters point out that allowing interpreters like python or node effectively grants everything, and that permission fatigue leads people to click allow. They want richer hooks and better sandboxing.
  • Keep secrets out of the agent entirely (a few): Some describe keeping credentials in a password manager and having the agent call a CLI that requires a fingerprint, or running the agent as a separate user with no secrets available.
  • Closed-source harness is a trust issue (a few): A minority argues that the closed harness makes it impossible to audit behavior. Others reply that open-source tools would leak the same way if they committed secrets.

Links from the comments

#security #secrets #claudeCode #github #aiAgents #permissions