Cursor hooks
Security scanning inside Cursor
Run checks from the host lifecycle instead of relying on a prompt. gate scans edits and inspects shell commands. turn answers at Stop: which of these did this turn just do?
Checks attached to host events
- 01 afterFileEditgate scans the file Cursor just changed
- 02 beforeShellExecutiongate decides before the command runs
- 03 stopturn reports only what this turn introduced
npm i -D owlwarden
npx owlwarden init --cursor
What that writes
.cursor/hooks.jsonwithafterFileEdit,beforeShellExecution, andstop..cursor/mcp.jsonwith the read-only server pinned to the installed binary..cursor/rules/owlwarden.mdcwith the rule summary used by the hooks.
stop runs turn --hook cursor --record,
not gate --since HEAD. The per-edit and pre-command hooks stay
on gate.
The rules file is not the control
Rules reduce avoidable findings, but they remain prompt context. Hooks are the part that runs independently of the model's decision.
Cursor's own configuration is a scan surface
.cursor/mcp.json, .cursor/hooks.json,
.cursorrules, and .cursor/rules/** are read by the
agent-config rules. They check unpinned MCP
server, a hook that pipes a fetch into a shell, a rules file with characters a
reviewer cannot see. Cursor is one git pull away from any of them.
npx owlwarden vet .
Keep reading
- owlwarden turnWhich of these did I just do?
- RulesTrigger, confidence, and framework-specific fix.
- Agent configHooks, MCP servers, instructions, and editor tasks.
- owlwarden vetCheck a repository before you open it.
- owlwarden sealNotice when your agent's execution surface moves.
- ExposureWhich of these findings do I fix first?
- RuntimesDoes this fix run on Bun, Deno, or Workers?
- CoverageMapped rules and categories static analysis cannot cover.