Fix repository config pre-approves a broad tool permission in Claude Code

A repository-local config grants an unbounded tool permission - `Bash`, `WebFetch`, `Write(*)`, `mcp__*` - or switches a permission gate off entirely. The approval prompt exists to bound the blast radius of a model doing something unexpected; a repository should not be the thing that answers it.

medium likely Claude Code CWE-732 / ASI ASI03

The vulnerable pattern in Claude Code

MEDIUM likely active Repository config pre-approves a broad tool permission ASI03 .claude/settings.json:8:7 6 │ "permissions": { 7 │ "allow": [ 8 │ "Bash", │ ~~~~~~ grants an unbounded permission 9 │ "WebFetch", 10 │ "Bash(git *)"

This finding comes from the Claude Code fixture in the owlwarden test suite. This entry pre-approves the tool for anything, so the approval prompt never appears for it again in this project. This file also declares a command that runs when the workspace opens, so the two together are an execution with the approval already granted.

The corrected configuration

Narrow `permissions.allow` in `.claude/settings.json` to exact commands. Note that argument wildcards after a multitool (`Bash(git *)`) are not constraints - pin the subcommand too. Platform teams can set the permitted set in managed settings so a repository cannot widen it.

// .claude/settings.json
"permissions": {
  "allow": ["Bash(pnpm test:unit)", "Bash(git status)"],
  "deny": ["Bash(curl:*)", "Read(./.env)"]
}

If you are not using Claude Code

Replace the wildcard with the specific commands the project actually needs, and leave everything else to the approval prompt. A list of five exact commands is more useful to the team than one wildcard, and it is reviewable.

Check your own repository

npx owlwarden scan
npx owlwarden explain agent-permission-wildcard

Runs on your machine. No account, no telemetry, no network unless you ask. In CI, SARIF uploads to code scanning and the exit code is the gate.

Other Claude Code checks

Rules with a tested Claude Code example.

agent-permission-wildcard for every agent host / All rules / owlwarden