The ignore was on the laptop — Claude Code's "don't ask again" saves secrets word for word, and the only ignore rule lives in one machine's global git excludes

Claude Code's "Yes, and don't ask again" stores the approved command verbatim in .claude/settings.local.json; Apiiro (via The Hacker News) found secrets in 1,122 public copies. Claude Code keeps the file out of git only via the user's global git excludes, a per-machine control. For credentials to personal data that makes it a GDPR Art. 32 question about organisational measures, with Art. 33's clock if a credential was used.

Post

A database password, typed once into a terminal command. One click on "Yes, and don't ask again". Months later it sits on a public GitHub branch, and the commit that put it there may be co-authored by the agent.

Apiiro scanned public GitHub for Claude Code's local settings file. The Hacker News reported the results on 7 November.

  1. What happens. "Don't ask again" saves the approved Bash command as an allow rule in .claude/settings.local.json. An exact command is kept word for word, secrets included. A bug report about exactly this has sat in Anthropic's issue tracker since August 2025. A bot closed it as "not planned" after 60 days of inactivity.

  2. What Apiiro counted. 1,122 of 104,185 public copies hold at least one secret, 1,379 distinct ones. More than a third open a database directly. In 539 of 1,105 traced repositories, a commit listing Claude as co-author changed the file. Liveness was not tested; one notified company confirmed its key was live.

  3. Before you blame the gitignore. Claude Code does keep the file out of git: the first time it writes it, it adds the path to your global git excludes. That protects one machine. The repository carries no rule, so a fresh laptop, a CI runner or a file created by hand has none.

  4. The EU part. This reads like a key-rotation chore. It is a GDPR question. A database password is access to whatever personal data sits behind it, and Article 32 asks whether your technical and organisational measures were appropriate. A rule in one developer's home directory is not an organisational measure. If someone did use the credential, the Article 33 notification clock runs from when you become aware, not from when you get round to cleaning up.

What I'd do Monday: → Put .claude/settings.local.json in every repository's own .gitignore. → Search your orgs and git history for both settings files. Rotate everything they ever held, then git rm --cached. → Approve patterns that reference variables, never a literal secret. → Add .claude/, .cursor/ and .gemini/ to secret scanning in CI, history included.

The tool did its part, on one machine. The ignore was on the laptop. The repository never knew.

Who on your team owns the ignore rules for agent config files?

#AgenticCoding #ClaudeCode #GDPR #DSGVO #AIAgents

AI disclosure: the narration voice, the cover art and the brand ident animation in this video are AI-generated. The script, the claims and the source checks are mine.

First comment

Sources:

The Hacker News on Apiiro's scan (7 Nov 2026): the counts, the co-authored commits, the mitigations https://thehackernews.com/2026/11/claude-codes-dont-ask-again-file.html

Apiiro's own write-up (could not be retrieved for this edition; the figures above are as reported) https://apiiro.com/blog/coding-agents-leaking-secrets-github-dont-ask-again

Claude Code settings docs: where "don't ask again" saves its allow rule, and the global git excludes https://code.claude.com/docs/en/settings

anthropics/claude-code issue #5544 (11 Aug 2025): plaintext credentials in settings.local.json, closed by a bot as not planned https://github.com/anthropics/claude-code/issues/5544

GDPR Articles 32 and 33: security of processing, breach notification https://eur-lex.europa.eu/eli/reg/2016/679/oj/eng

Cut for length: the scanners disagree. Of the 1,122 files, gitleaks flagged 564, TruffleHog 643, and 215 were flagged by neither. A password inside a command line is the case most secret scanners were not built for.

AI disclosure: the narration voice, the cover art and the brand ident animation in this video are AI-generated. The script, the claims and the source checks are mine.

Claims

Sources

Corrections

None.

AI disclosure

The video for this edition contains AI-generated media: the narration is a synthetic voice, the cover art and any background imagery are generated, and the brand ident animation is generated. The script, the claims and the source verification are human-authored and human-checked. Assets carry IPTC DigitalSourceType and C2PA Content Credentials.