Fix repository config pre-approves a broad tool permission in VS 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 VS Code CWE-732 / ASI ASI03
The vulnerable pattern in VS Code
This finding comes from the VS Code fixture in the owlwarden test suite. `security.workspace.trust.enabled` is set to `false`, which removes the approval step for the whole session. The prompt is the control; a repository that answers it in advance has removed the control.
The corrected configuration
Leave `security.workspace.trust` enabled. Restricted mode exists precisely so that opening an unfamiliar repository is safe, and a repository asking you to switch it off is asking for the one thing it should not be able to ask for.
// user settings.json
"security.workspace.trust.enabled": true
If you are not using VS 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 VS Code checks
Rules with a tested VS Code 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-mcp-unpinned-remote medium MCP server declaration resolves code at run time
agent-permission-wildcard for every agent host / All rules / owlwarden