Skip to main content

What's new

Check what your coding agent's "don't ask again" list remembers

A task's checks in 1904: Syntax, Types and Lint passed, and Security showing a warning for 1 possible secret on changed lines that does not block merging, with its output naming .claude/settings.local.json line 9 and advising to move the secret to an environment variable or secret store and rotate it.

It's late, the agent wants to run a migration, and the command has the connection string in it, password and all. You choose Yes, and don't ask again so you aren't asked the next twenty times. Claude Code saves that approval as an allow rule in .claude/settings.local.json, exactly as you approved it. That file is meant to stay on your machine, and research Apiiro published last week shows how often it doesn't.

What the research found

Apiiro looked at 104,185 public copies of that file on GitHub. 1,122 of them held a real secret, 1,379 distinct ones in all, and 379 of those were database passwords. Older versions of the file in Git history held 734 more. Claude Code adds the file to your global Git excludes when it creates it, so on the machine where that happened you're covered. The gaps are everywhere else: a second laptop, a container, a teammate's machine, or a copy of the file somebody made by hand. In the Hacker News discussion, the person who posted the research pointed at machines and containers without the global ignore as where it happens. Any file an agent writes inside your project folder deserves the same suspicion.

Find out whether yours ever left

Look at each repository's history, not only the files in it today. Deleting the file in a new commit leaves every earlier version readable, along with any fork made in the meantime. Running git log --all -p on .claude/settings.local.json and on .claude/settings.json shows every version either file has had. If one ever held a secret, change that password or token first and clean up the history afterwards, because a rewrite can't reach a copy someone already pulled.

Give the approval nothing worth stealing

The saved rule holds whatever the command held. Put the connection string in an environment variable and let the command say $DATABASE_URL, so the rule records a name and the password stays in your environment. Approve a pattern such as Bash(npm run test:*) instead of one exact command, which also means fewer prompts. Then add .claude/settings.local.json to the repository's own .gitignore. That rule travels with the code, so it covers every machine and container that clones it, and nobody's setup has to remember it.

A scanner catches what habits miss

Run a secret scanner on changes before they're pushed, in a pre-commit hook or in CI. It matches known secret formats, so it won't catch everything, but it can catch a token sitting in a settings file nobody thought to open during review.

How this works in 1904

In the Agents dashboard, when an agent finishes a turn in a task, the task's Checks tab runs Security on the lines the task changed. A new file that Git isn't ignoring counts as changed, so an agent's settings file that would be committed gets scanned like any other. A possible secret shows as a warning with the file and line under Output, along with the advice to move it to an environment variable or secret store and rotate it. It's a warning and doesn't block merging, so the decision stays with you.

It reads only what the task changed. A secret already sitting in your history won't show up there, so the search above is still how you find one.

← All posts

Start with an idea, or start with what you have.

Use AI supplied by 1904, or connect the subscription you already pay for.