Security for Cursor Development: Allowlists, hooks and the CLI

Part 10 of 16

Allowlists, hooks and the CLI

  • Allowlists: keep terminalAllowlist in ~/.cursor/permissions.json to read-only commands and add no *:* MCP entries (Cursor docs).
  • Auto-review guidance: block_instructions steer the classifier toward asking you about credentials, deletes and pushes, but they are “steering, not enforcement”.
  • Hooks: they fail open by default, so set "failClosed": true on every hook you rely on for security (Cursor docs).
  • The Cursor CLI: use allowlist approval with the sandbox on, deny Read(**/.env*), and never alias agent with --yolo or --force (Cursor docs).

The permissions.json and CLI settings are in the audit’s fix section.