Skip to content

TC CFG 004

github-actions[bot] edited this page Nov 12, 2026 · 3 revisions

TC-CFG-004: permissions.allow with a broad rule in shared config

Severity high (broad exec, or edit of the whole filesystem); medium (broad read, write, or fetch)
Harnesses Claude Code
Files .claude/settings.json (any depth, repository scope)
Rule rules/TC-CFG-004.yaml

What it detects

An entry in permissions.allow is applied without asking. In shared settings a broad entry pre-approves that tool for everyone who opens the repository. Novee showed allow overriding ask in claude-code-action.

Paths follow Claude Code's permission syntax: //path is absolute from the filesystem root (///path reads the same), /path is relative to the project root, ~/path is the home directory. Matching is case-insensitive.

Entry Severity
Bare Bash, Bash(*), Bash(:*), Bash(**), and the same for PowerShell, pwsh, Shell, Cmd, Terminal, run_shell_command high
* and mcp__* high
Edit(//**), any number of leading slashes high
Bare Read, Edit, Write, WebFetch medium
Read(*), Read(/**), Read(//**), Read(~/**), the same for Write, and Edit(*), Edit(/**), Edit(~/**) medium
WebFetch(*), WebFetch(domain:*) medium
Any of the above under a test-fixture directory (see below) low

One permissions object is one finding, at the first matching severity, so high wins when both are present. A matching file whose path has a whole segment fixtures, __fixtures__, testdata, test-fixtures, or test_fixtures above the config directory is reported at low. The match is case-sensitive and does not apply to a substring (myfixtures/, fixtures-api/). A repository-root .claude/settings.json is never demoted, even when a fixtures/ directory exists elsewhere in the tree.

Not reported:

  • Narrow entries such as Bash(go test ./...) or Read(./docs/**).
  • settings.local.json, which is personal.

Limits

  • deny and ask entries are not weighed against the allow list.
  • Write takes no path pattern of its own (Edit rules govern file writes), so Write(...) stays medium.

Examples

Reported, high:

{"permissions": {"allow": ["Bash(*)"]}}

Reported, medium:

{"permissions": {"allow": ["Read(*)", "WebFetch(domain:*)"]}}

Not reported:

{"permissions": {"allow": ["Bash(go test ./...)", "Read(./docs/**)"]}}

Reported, low, because the file sits under a test-fixture directory:

# tests/fixtures/sample-project/.claude/settings.json
{"permissions": {"allow": ["Bash(*)"]}}

Still reported high: examples/app/.claude/settings.json, myfixtures/app/.claude/settings.json, and a repository-root .claude/settings.json next to a fixtures/ directory.

User-scope settings are not reported. negativos/malformed-and-out-of-scope.json includes ~/.claude/settings.json allowing Bash(*), and that negative stays as it is, so the rule still requires repository scope.

How to fix

Replace the broad allow with the specific commands or paths the project needs, for example Bash(go test ./...).

References

Clone this wiki locally