◉CLAUDE LABJP
●CC 2.1.327 — Claude Code 2.1.327 (11/18) adds claude mcp add-json, which reads a server's JSON from stdin●MCP.JSON — The same release stops project-scope mcp add and remove from wiping other keys in .mcp.json●SONNET 4.5 — Retires on the Claude API on 11/30, 11 days left. Sweep model IDs in code and saved settings in one pass●GATEWAY — Users report that behind a gateway, 1M-context models compact so late that each reply takes tens of seconds●NEON — Gemini 4 Neon went GA on 11/18. If you run it next to Claude Code, keep each tool's MCP config separate●NEW — Linked Billing 402 or 403? Find Whose Wallet Is Empty First●CC 2.1.327 — Claude Code 2.1.327 (11/18) adds claude mcp add-json, which reads a server's JSON from stdin●MCP.JSON — The same release stops project-scope mcp add and remove from wiping other keys in .mcp.json●SONNET 4.5 — Retires on the Claude API on 11/30, 11 days left. Sweep model IDs in code and saved settings in one pass●GATEWAY — Users report that behind a gateway, 1M-context models compact so late that each reply takes tens of seconds●NEON — Gemini 4 Neon went GA on 11/18. If you run it next to Claude Code, keep each tool's MCP config separate●NEW — Linked Billing 402 or 403? Find Whose Wallet Is Empty First
Articles/Claude Code
⟐ Claude Code/2026-08-21Intermediate

My read-deny rules never reached inside the folder I had allowed

An audit of how far permissions.deny Read rules actually reach in a working tree where secrets and source code live side by side, with a script you can run today.

Claude Code289permissions15settings.json10security21indie development26

✦ Premium Article

I was doing a cleanup pass over my working tree when I stopped.

.env was in the deny list. So was the whole secrets/ directory. And yet tools/backup/.env.bak matched nothing at all.

It was a backup I had taken six months earlier, before swapping some configuration around. The contents were untouched, and the keys inside it still worked.

The short version

permissions.deny Read rules block whatever matches the patterns you wrote. That sounds obvious, but here is what it means for a real working tree: safety is not measured by how many rules you wrote, it is measured by how many secrets are still uncovered.

In my setup, a naive two-line configuration left eight files completely untouched by any rule. Rewriting it as ten lines brought that number to zero.

What follows is how I counted, and what I decided afterwards.

Secrets and source living in the same tree

Clean repository separation does not always survive contact with how an indie developer actually works.

In my case, iOS and Android apps sit alongside several sites under a single synced folder. The app side holds the signing keys used for Google Play submissions and google-services.json; the site side holds a .dev.vars for Cloudflare. Keeping them next to the build configuration and assets is what makes daily work possible, so physically splitting them apart was never a realistic option.

Which means the files I want an agent to read and the files it must never touch are mixed together a few levels down from the same root. Once you add that root to permissions.allow, the precision of your deny rules becomes your actual security posture.

Here is where I started:

{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./secrets/**)"
    ]
  }
}

That was enough on the day I wrote it. It stopped being enough because the tree kept growing.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You will be able to list exactly which files your deny rules reach today, instead of assuming the rules you wrote are doing their job
✦You will be able to close the gap where a backup extension or a rename quietly pushes a secret outside your patterns, before it ever costs you
✦You will be able to choose a two-layer defence that combines deny rules with how you lay out the tree itself
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-08-20
Take Inventory of What You Allowed with Don't Ask Again in Claude Code
After clicking Don't ask again a few dozen times, can you still explain what you approved? Here is a script that counts your current rules, plus a way to rebuild permissions from the smallest possible set.
⟐ Claude Code2026-10-19
If You Wrote MCP Allow Rules as Just `mcp__servername` — After v2.1.299, Only Servers With `__` in Their Names Need a Recheck
Claude Code v2.1.299 changed MCP allow rules to match only the server they name. A bare mcp__servername is affected only when the server name contains __ or ends in _. Includes a short audit script.
⟐ Claude Code2026-09-04
The One File I Keep Out of Claude Code's Reach: project.pbxproj
With Xcode project files, the breakage that still opens costs far more than the breakage that refuses to open. Here is what I measured before moving every edit behind a script, and where the line sits today.