1 in 6 public Claude Code configs contains a permission rule that does nothing

sfox1001 pts0 comments

1 in 6 public Claude Code configs contains a permission rule that does nothing · GitHub

/" data-turbo-transient="true" />

Skip to content

-->

Search Gists

Search Gists

Sign in

Sign up

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

Instantly share code, notes, and snippets.

sfox100/claude-code-dead-permission-rules.md

Created<br>August 3, 2026 12:40

Show Gist options

Download ZIP

Star

(0)

You must be signed in to star a gist

Fork

(0)

You must be signed in to fork a gist

Embed

Select an option

Embed<br>Embed this gist in your website.

Share<br>Copy sharable link for this gist.

Clone via HTTPS<br>Clone using the web URL.

No results found

Learn more about clone URLs

Clone this repository at &lt;script src=&quot;https://gist.github.com/sfox100/128e8ef9f68109efe1322a56c5e67977.js&quot;&gt;&lt;/script&gt;

" readonly="readonly" data-autoselect="true" data-target="primer-text-field.inputElement " aria-describedby="validation-4c70cd95-9171-435a-8865-0864ca3ec444" class="form-control FormControl-monospace FormControl-input FormControl-small rounded-left-0 rounded-right-0 border-right-0" type="text" name="gist-share-url-sized-down" />

Save sfox100/128e8ef9f68109efe1322a56c5e67977 to your computer and use it in GitHub Desktop.

Embed

Select an option

Embed<br>Embed this gist in your website.

Share<br>Copy sharable link for this gist.

Clone via HTTPS<br>Clone using the web URL.

No results found

Learn more about clone URLs

Clone this repository at &lt;script src=&quot;https://gist.github.com/sfox100/128e8ef9f68109efe1322a56c5e67977.js&quot;&gt;&lt;/script&gt;

" readonly="readonly" data-autoselect="true" data-target="primer-text-field.inputElement " aria-describedby="validation-3003bf8d-e541-4a06-8417-d6863f74c59e" class="form-control FormControl-monospace FormControl-input FormControl-small rounded-left-0 rounded-right-0 border-right-0" type="text" name="gist-share-url-original" />

Save sfox100/128e8ef9f68109efe1322a56c5e67977 to your computer and use it in GitHub Desktop.

Download ZIP

1 in 6 public Claude Code configs contains a permission rule that does nothing

Raw

claude-code-dead-permission-rules.md

1 in 6 public Claude Code configs contains a permission rule that does nothing

I run Claude Code with a lot of autonomy, so the permission config is the part I actually rely<br>on. Auditing my own settings turned up a class of rule that is accepted without complaint and<br>never fires. It turns out this is a known, documented behaviour. What nobody had done was measure<br>how common it is - or check whether the dead rules matter.

The mechanic

Claude Code file permission checks consult Edit(path) and Read(path) rules only. A path rule<br>on Write, Glob, NotebookEdit or the legacy MultiEdit is accepted and never matched. From a<br>real public config:

{ "permissions": { "deny": ["Write($HOME/.ssh)", "Write(**/*.pem)"] } }

That protects nothing. The working shape is Edit($HOME/.ssh) - Edit rules cover all<br>file-editing tools.

To be clear about prior art: this is in the permissions docs, in the v2.1.210 changelog, and<br>filed as anthropics/claude-code#75315. Recent versions print a startup warning naming the exact<br>rule and the fix. This is not a hidden bug. That is what makes the measurement interesting.

The measurement

149 public .claude/settings.json files from GitHub, 134 with permission rules, 3,132 rules:

21 of 134 configs (16%) contain at least one dead path rule - 50 in all

34 of the 50 sit next to a working Edit/Read twin: dead weight, not danger

16 have no working twin - whatever they were meant to do is not happening

8 of those are deny rules aimed at credentials: .ssh, .kube, .aws, secrets/,<br>*.pem, *.key

one config contains deny: Write(rm -rf *) - a Bash-shaped rule on a file tool, which no<br>warning catches

The twin column is the point. Most dead rules are harmless clutter next to a rule that works.<br>The rest are people who believe their SSH keys and certificates are write-protected, and they<br>are not - a documented behaviour, a shipped warning, and the misconfiguration is still sitting<br>in 1 in 6 public configs.

Where the warning goes

Why does a warned-about misconfiguration persist? Because of where the warning is delivered:

Surface<br>Do you find out?

CLI, interactive<br>Yes - and it stays in scrollback

CLI, piped / CI / 2>/dev/null<br>No (documented: routed to debug log to keep output clean)

VS Code extension<br>Only via View -> Output -> "Claude VSCode"

Agent SDK<br>No

The stderr routing is a documented, deliberate choice, not an oversight - but the sum of the<br>choices is that the warning reaches an interactive terminal and nothing else. In the extension,<br>the CLI's [WARN] arrives downgraded to an [info] line in an output-channel log file. No toast,<br>no banner, nothing in the panel - verified against...

claude code gist rule permission rules

Related Articles