GUIDE, read 12 Nov 2026
Cursor's guardrails are best-effort, so pick Auto-review or Allowlist, never Run Everything
Cursor's defaults let the agent read and edit freely and ask before it acts outside the editor
Cursor's agent security page lays out the default behavior. Reading files and searching code do not require approval. Agents can modify workspace files without approval, except configuration files such as workspace settings, which need approval first. Changes save to disk immediately, and Cursor warns that with auto-reload enabled, agent changes might run before a developer can review them.
Terminal commands need approval by default. All MCP connections need approval, and after a connection is approved each tool call still needs individual approval unless the tool is on an MCP allowlist. The page says the agent cannot make arbitrary network requests with default settings; Cursor lists the destinations its tools contact.
Cursor is candid about the strength of these controls. It describes Run Modes as best-effort guardrails rather than a hard security boundary, and recommends keeping the defaults enabled. For a security reader that sentence decides the design: treat the prompts as a speed bump, and put hard limits in the sandbox, the managed policy and an external control.
Run Modes decide how much autonomy the agent gets
Cursor's Run Modes page, found under Settings, Agents, Approvals and Execution, lists three modes. Auto-review runs allowlisted calls immediately, sandboxes other shell commands when possible, and sends calls that cannot use the sandbox to a classifier. Allowlist runs only the actions on a list and is described as deterministic. Run Everything runs every tool call with no sandbox and no classifier.
The classifier deserves a closer read. Cursor says it runs on the Cursor backend and can make read-only ReadFile, Grep, Glob and ListDir calls on the developer's machine, for example to read a script a command runs. It runs on small Cursor-managed models, which the page names as Gemini 3.5 Flash Lite with Haiku as the fallback. Cursor states plainly that the classifier can make mistakes in either direction. If a sandboxed command fails on a sandbox restriction, the agent can rerun it outside the sandbox, and the classifier reviews that rerun.
Teams can steer the classifier in plain English through permissions.json, either at ~/.cursor/permissions.json or in a project's .cursor/permissions.json, with allow_instructions and block_instructions. A team configuration defined in the dashboard takes priority and Cursor then ignores the user and project files.
- Choose per risk. Auto-review fits most developers. Allowlist fits repositories where you want a short fixed set of trusted actions.
- Keep a model available. Cursor says blocking Claude 4.5 Haiku in enterprise model controls can disable Auto-review, and members then fall back to Allowlist.
- Write block instructions for the commands that matter locally. The page's own examples are cloud CLI commands and anything that modifies Kubernetes resources.
The sandbox limits shell commands but lets some commands step outside it
Per Cursor's Run Modes page, the sandbox runs terminal commands in a restricted environment. Commands get read and write access inside the workspace. Protected paths include .git/config, .git/hooks, .vscode, .cursorignore and sensitive Cursor configuration. Network is blocked by default, then opened by the network mode and by sandbox.json. Temporary files are writable unless the file disables them.
Some commands need more access, such as full network access, writes outside the workspace or privileged operations. They cannot use the sandbox. Cursor says it indicates when a command runs outside the sandbox and asks for approval. sandbox.json can be set per user at ~/.cursor/sandbox.json or per project, with the project file taking priority, and Cursor states that team-admin policies and its hardcoded rules layer on top so local files cannot weaken them.
On reads, Cursor documents a setting that many teams will want to change. Read Access defaults to System, which lets the agent read files outside the workspace without approval. Setting it to Workspace makes reads outside the workspace require approval unless the path is on a Read Allowlist. Read Access does not apply in Run Everything mode. For laptops that hold SSH keys and cloud credentials, Workspace is the safer choice, and it can also be set per machine or project with readBoundary in sandbox.json.
MCP servers add tools that Cursor approves one call at a time
Cursor's MCP page covers local and remote servers over stdio, SSE and streamable HTTP, with OAuth for remote servers. Team admins can distribute servers through a team marketplace, and these appear alongside personal and workspace servers. Static OAuth client credentials can be supplied in mcp.json for providers that do not support dynamic client registration, and values can come from environment variables rather than being written into the file.
Cursor's security page links a separate set of MCP security considerations in its developer docs. The default approval of the connection and then each call is the main control. The weak point is the allowlist: once a developer pre-approves a tool, calls to it run without a prompt, so review which servers sit on team-distributed lists and what each tool can reach.
Cursor workspace trust exists but is disabled by default, per the agent security page. When enabled, it prompts for normal or restricted mode on new workspaces, and restricted mode breaks AI features. Cursor's advice for untrusted repositories is to use a basic text editor, and it says organizations can enforce the trust setting through MDM.
Privacy Mode governs where prompts and code go, and Cloud Agents are the exception
Cursor's security page says Privacy Mode can be enabled in settings or by a team or enterprise admin, is available to free and Pro users, and is inherited by new team members. With it on, Cursor says it will not train on the data. Its data governance page says Privacy Mode is on by default for Enterprise teams, and that most models run under zero data retention agreements.
That page also identifies the one feature that stores code. Cloud Agents are the only feature that requires Cursor to store code, and Cursor says that if a security policy prohibits code storage, the answer is not to enable Cloud Agents. A few models require data retention at the provider. For Enterprise customers and teams with Privacy Mode, Cursor requires admin approval before those models can be used.
For corporate devices, Cursor documents an Allowed Team IDs policy that prevents users from logging into personal accounts, which might lack Privacy Mode. Cursor points to MDM deployment patterns for rolling out the policy. Cursor's security page lists ISO/IEC 27001:2022, ISO/IEC 42001:2023, AIUC-1 and SOC 2 Type II as held certifications.
Hooks and audit logs cover different ground
Cursor hooks are scripts that run before or after stages of the agent loop. The hooks page says they are spawned processes that communicate by JSON over stdio, are defined in hooks.json at the project or user level or installed through plugins, and can observe, block or modify behavior. Stages named on the page include beforeShellExecution, beforeMCPExecution, beforeReadFile, afterFileEdit and the generic preToolUse. The page also notes that Cursor can load hooks from third-party tools such as Claude Code.
The audit log is narrower than many buyers assume. Cursor's compliance page says audit logs record who changed what in the team: sign-ins, membership, roles, API keys, settings and integrations. Payloads never contain prompts, agent output, generated code or credentials, and the logs are available on the Enterprise plan. For development activity, the same page tells customers to use hooks. A security team that wants a record of agent shell commands therefore has to build or buy a hook-based collector.
An endpoint control adds the record and the decision Cursor leaves to hooks
Cursor's own design leaves two gaps for a security team. The guardrails are best-effort by Cursor's account, and the audit log omits agent activity. Hooks are the sanctioned place to fill both, and several vendors build on them. Noma says it uses Cursor Agent Hooks for inline decisions before actions happen, aimed at destructive operations, credential leakage, indirect injection, tool misuse and workspace-trust code execution. Pillar says its runtime component sits in the pre-tool hook for Claude Code, Codex CLI and Cursor. Zenity says native hooks and its MCP gateway can block or modify a dangerous tool call before it executes in Cursor, among other coding agents. CrowdStrike lists Cursor among agents with hooks that can inspect prompts and block malicious activity. These are vendor claims, read on 12 Nov 2026.
When you evaluate one, test three things Cursor's docs make relevant: whether it fires on beforeShellExecution and beforeMCPExecution, whether it logs the command text off the laptop, and whether it still has an effect when a developer chooses Run Everything, since that mode runs every call without checks.
Where this sits in the index
- Agent Surface MapWhich of six agent surfaces each of 16 tools sees
- Action Control MatrixWhich of six agent actions each tool can stop
- The ranked index16 tools on seven published criteria
Related guides
- Securing GitHub Copilot agent mode and the cloud agent
- Securing OpenAI Codex CLI on developer laptops
- Securing Claude Code on developer laptops
Sources
- Cursor: security, read 12 Nov 2026
- Cursor: docs, agent security, read 12 Nov 2026
- Cursor: docs, run modes and sandboxing, read 12 Nov 2026
- Cursor: docs, MCP, read 12 Nov 2026
- Cursor: docs, hooks, read 12 Nov 2026
- Cursor: docs, privacy and data governance, read 12 Nov 2026
- Cursor: docs, compliance and monitoring, read 12 Nov 2026
- Noma Security: runtime security for Cursor blog post, read 12 Nov 2026
- Pillar Security: Agentic Endpoint platform page, read 12 Nov 2026
- Zenity: coding and personal agents use case, read 12 Nov 2026
- CrowdStrike: Falcon Guardian blog post, read 12 Nov 2026
Last reviewed 12 Nov 2026.