Your hand pauses over Publish. Hours of careful work are ready to leave your machine—but did something private find its way in? The screen goes dark, and the question follows you.
Clicked "Don't ask again" in Claude Code? Check the settings file before publishing.
Research published in November 2026 showed that approved commands can leave embedded secrets in .claude/settings.local.json.
The file is normally excluded from Git, but adding an already tracked file to .gitignore does not untrack it.
Start by scanning the folder you plan to publish, including its AI configuration files.
The free Zero-Trace Ship Kit scanner processes selected files inside your browser. The files you scan are not uploaded to a server.
With the full kit's Git hooks installed and enabled, supported findings stop the commit or push.
$39 for an individual, or $149 for Team use by up to 10 people in one organization. One-time purchase.
"No findings" means no supported pattern was detected; it does not prove that the files contain no secrets.
Demo (25 seconds): found → commit stopped → fixed → passed. The full kit run in a real git repository with made-up data planted in it, exit codes included. https://zero-trace-ship-kit.zeus-lab-global.workers.dev/?utm_source=devto#demo
| What you get | Free | Full kit |
|---|---|---|
| Browser scanner | yes | yes |
| Text-file report command | yes | yes |
| Blocks commit and push automatically | — | yes |
| Checks ZIPs inside ZIPs, photo GPS, PDF and Office authors | — | yes |
| Cleaned distribution ZIP with a SHA-256 manifest | — | yes |
Carry this check into your next commit. Automate pre-commit and pre-push scanning with the full kit.
Enabled hooks block supported findings. Cleaned distribution ZIP generation is included.
Individual $39 / Team $149 for up to 10 people in one organization. One-time purchase. No subscription.
Buy Individual — $39 / Team — $149, up to 10 people
1. What is happening
When you approve a command in Claude Code with "don't ask again", the approved command is saved as a literal string under permissions.allow in the project's .claude/settings.local.json. If the command carried a password or token inline, that is saved too.
{"permissions": {"allow": ["Bash(PGPASSWORD=... psql -h db.example.com -U app)"]}}
The file is personal, and Git ignores it when Claude Code creates it. If it was created by hand, or added with git add before the ignore rule existed, it stays tracked and gets pushed. A tracked file is not removed by adding it to .gitignore later.
Several write-ups described this in November 2026 (Cloud Security Alliance research note, GitGuardian). The figure of 2,539 widely quoted from Apiiro's November 5 report counts secrets gathered from settings files, Git history and agent transcripts; not all of them are keys confirmed to be valid. For current copies of settings.local.json alone, the reported figure is 1,122 of 104,185 public files (about 1.1%). These are the company's findings as reported; we have not verified them independently.
2. Check your own repository
# list tracked AI configuration files
git ls-files .claude
# was it ever committed?
git log --oneline --all -- .claude/settings.local.json
# stop tracking it (the file stays on disk)
git rm --cached .claude/settings.local.json
echo ".claude/settings.local.json" >> .gitignore
A credential that reached history or a remote cannot be taken back by deleting the file. Revoke it at the issuer and create a new one.
For the contents, dropping the folder into the browser scanner is the quick way. It detects secrets inside the permission rules of .claude/settings.local.json and .claude/settings.json, the .claude/.credentials.json file, inline passwords such as PGPASSWORD=..., MYSQL_PWD=..., REDISCLI_AUTH=... and --password=..., and database URIs that carry a password. Obvious placeholders such as <password> or $DB_PASS are not reported.
3. Traces that end up in what you publish
When an agent works on your machine, logs, configs, error output and test results pick up details of that machine. Typical leftovers:
| Kind | Example |
|---|---|
| Absolute home paths |
/Users/<login>/..., /home/<login>/..., C:\Users\<login>\...
|
| Keys | service API keys, anything starting BEGIN ... PRIVATE KEY
|
| E-mail addresses | a contact line in a README, the commit identity |
| Image metadata | JPEG EXIF (can include GPS), PNG text chunks |
| Document authors | PDF Author, Office creator fields |
| OS residue |
.DS_Store, __MACOSX/, Thumbs.db, .env
|
| Git identity | commits made under a personal name and address |
ZIPs are where this gets missed: people review the working folder, not the archive they built from it, and certainly not a ZIP inside that ZIP.
4. The gate
The policy is one line: if anything is found, the commit or push fails.
4.1 Known shapes: regular expressions
HOME_PATH = re.compile(
r"(?<![\w.])(?:/Users/|/home/|[A-Za-z]:\\{1,2}Users\\{1,2})([A-Za-z0-9][A-Za-z0-9._-]*)"
)
The leading (?<![\w.]) keeps URLs such as https://example.com/home/dashboard from matching. Placeholder and CI names such as you or runner are allowed.
4.2 Your own name: read at run time, never stored
A scanner with your real name written in it is itself a leak. The gate reads the login name, the full name registered with the OS, and the global git identity from the machine on each run, matches in memory only, and masks them in its output.
raw.add(getpass.getuser())
raw.add(Path.home().name)
full = run(["id", "-F"]) # macOS: registered full name
Terms are searched as UTF-8 and as UTF-16, because Office files and some binaries store names that way.
4.3 Archives: open them all the way down
def scan_archive(self, where, data, depth):
with zipfile.ZipFile(io.BytesIO(data)) as zf:
for info in zf.infolist():
self.scan_bytes(f"{where}!/{info.filename}", zf.read(info), depth + 1)
scan_bytes calls scan_archive again when a member is itself a ZIP. .docx and .xlsx are ZIPs too, so creator fields are read through the same path.
4.4 Images: walking segments is enough
Walk the JPEG segments; an APP1 segment that starts with Exif means EXIF is present, and tag 0x8825 inside it means GPS data. No imaging library needed.
4.5 Hooks
# .git/hooks/pre-commit
exec python3 gatekeeper/zero_trace_check.py --staged --identity
# .git/hooks/pre-push
exec python3 gatekeeper/zero_trace_check.py --all --identity --history --remote --path dist
Pre-commit scans exactly what is staged. Pre-push scans the whole tree, commit authors and messages, the remote URL, and the git-ignored folder where distributable ZIPs are built. The same check runs as the first job in GitHub Actions; publishing jobs depend on it.
5. Verification
A checker grading itself proves nothing, so a separate program builds a throw-away corpus of planted leaks and clean look-alikes and runs the gate over it. Planted values are assembled at run time, so the probe itself passes the gate.
| Item | Result |
|---|---|
| Files with a planted leak | 32 of 32 detected |
| Clean look-alikes | 0 false positives out of 17 |
| Time | about 12 to 18 ms across two runs (Python 3.14, Apple Silicon Mac, single run) |
The planted set: inline passwords (the environment-variable form and --password=), a database URI with a password, AI settings files (settings.local.json itself, a token inside a permission rule of a shared settings.json, .credentials.json), BIP-39 recovery phrases (12 and 24 words), an EVM private key assigned to a key name, a Solana keypair file, an exchange API secret, absolute paths for three operating systems, four kinds of key and private key, an e-mail address, a hard-coded password, a JPEG with EXIF and GPS, a PNG with a text chunk, .DS_Store, .env, a PDF with an author, a ZIP containing a path, a ZIP inside a ZIP containing a key, a ZIP with __MACOSX, a truncated ZIP, a .docx with a creator, a binary holding a private term in UTF-16, and a file name containing a private term.
The clean set includes database documentation that holds placeholders only (<your-password>, $DB_PASS, changeme, user:password@localhost), a .claude/settings.json without secrets, a SHA-256 value (the same 64 hex digits as a key), ordinary prose that happens to use wordlist words, placeholder paths like /Users/you/, actions/checkout@v4, logo@2x.png, example.com addresses, a URL containing /home/, and code that only reads credentials from the environment.
The raw result is published as is: https://zero-trace-ship-kit.zeus-lab-global.workers.dev/evidence/selftest.json
6. Limits
- Free-form information is not detected. A real name or address in prose is only caught if it is a term read from the machine or one you added to the local deny-list.
- Key detection covers common formats only.
- Text visible inside an image is not read.
- "Zero findings" means none of the shapes this gate knows are present. It is not a proof of safety.
The whole setup
The arrangement that moves the check from attention to a gate on your own machine, on one page. Numbers are measured in our own tests.
Summary
- A command approved with "don't ask again" is stored as a literal string. Do not approve commands that carry a secret inline.
- A tracked file is not removed by
.gitignore. Check withgit ls-files .claude, untrack withgit rm --cached. - A credential that got out is revoked, not deleted.
- Do the check at commit and push, not by attention. Open archives all the way down.
The browser scanner and a lite command-line report for text files are free: https://zero-trace-ship-kit.zeus-lab-global.workers.dev/?utm_source=devto
The free edition (lite command and local MCP server) is on GitHub: https://github.com/ZEUSLABZERO/zero-trace-lite
The full kit with the gate that blocks commit and push and the ZIP packager: https://zeuslab.gumroad.com/l/zero-trace-ship-kit?utm_source=devto
The full kit also includes a local MCP server so that Claude Desktop or Cursor can call the gate. It has no external package dependencies, but that does not remove supply-chain risk as a whole (Corelight reported in November 2026 that MCP server dependencies can change between rebuilds). Check the SHA-256 of what you download each time it is updated.
The estimate of cumulative input cost for agents, and the guard that refuses a call before it runs, now live in a separate post.
Disclosure: this article was drafted with AI assistance (Claude) and checked against the measured results and the published files. Product links lead to our own paid kits.

Top comments (0)