CLAUDE LABJP
2.1.273 — A round of connection work landed together: five opt-in headers for LLM gateways, and a notice when Claude Code stops trying to reconnect an MCP server09/29 — The date beside claude-sonnet-4-5 is 12 days out, but it is an earliest-possible estimate. The model is still Active, and public retirements get at least 60 days noticeMCP — People keep asking to reconnect a dropped server without ending the session. The disconnect is now announced, but reattaching is still something you do by handNEW — A scheduled task ran some days and not others. The cause was that only one folder had been bound to itWINDOWS — When Cowork fails on its very first task, check developer mode and the setup state before going looking for a causeHANDOFF — Before a long draft gets too heavy for one chat, decide on the three things the summary must carry into the next one2.1.273 — A round of connection work landed together: five opt-in headers for LLM gateways, and a notice when Claude Code stops trying to reconnect an MCP server09/29 — The date beside claude-sonnet-4-5 is 12 days out, but it is an earliest-possible estimate. The model is still Active, and public retirements get at least 60 days noticeMCP — People keep asking to reconnect a dropped server without ending the session. The disconnect is now announced, but reattaching is still something you do by handNEW — A scheduled task ran some days and not others. The cause was that only one folder had been bound to itWINDOWS — When Cowork fails on its very first task, check developer mode and the setup state before going looking for a causeHANDOFF — Before a long draft gets too heavy for one chat, decide on the three things the summary must carry into the next one
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 Code253permissions10settings.json8security18indie development23

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 $15 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-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.
Claude Code2026-08-27
Trusting the allow rules in your repo, or moving them to the environment
On disposable machines, the permissions.allow rules committed to your repo are dropped while the workspace waits to be trusted. Here is what gets dropped and what survives on 2.1.246, where each kind of rule belongs, and a preflight that catches the gap before a run starts.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links