Fix repository config pre-approves a broad tool permission in Cursor
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 Cursor CWE-732 / ASI ASI03
The vulnerable pattern in Cursor
This finding comes from the Cursor 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.
The corrected configuration
List the exact commands in Cursor's allow list rather than a wildcard, and keep the approval prompt for everything else.
// .cursor/settings
"allow": ["pnpm test", "pnpm lint"]
If you are not using Cursor
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 Cursor checks
Rules with a tested Cursor example.
- agent-config-env-redirect high Repository config redirects the agent's API traffic
- agent-config-loader-script high Executable script inside an agent or editor config directory
- agent-config-secret-reachable high Repository config puts credentials in reach of a repository-controlled command
- agent-hook-autoexec high Repository config executes a command when the workspace is opened
- agent-hook-untrusted-command high Hook command reaches outside the project
- agent-instructions-directive medium Instruction file tells the agent to bypass its own controls
- agent-marketplace-untrusted medium Repository config adds a third-party plugin or skill source
- agent-mcp-unpinned-remote medium MCP server declaration resolves code at run time
agent-permission-wildcard for every agent host / All rules / owlwarden