Checklist
Is Cursor secure? What to check before you ship
Short answer. Cursor is an editor and an agent in the repo you opened. Its security page describes the product. The checks are what gets sent as model context, secrets a command can still read, which tool calls run without you, and the code that lands in git. Those checks are not a verdict.
Updated 27 Nov 2026
This is a practical checklist, not a guarantee. It is not a penetration test, a compliance audit, or proof that an app is safe to launch.
This page answers the question with the checks, not with a yes or a no. Cursor does not host the app. The settings walkthrough, including rules, hooks, and extension install, is how to secure a Cursor-built app. The short list after the agent stops is Ship a Cursor app. Cursor is the directory entry. The same question for other agents and hosted builders is Is Claude Code secure?, Is Windsurf secure?, Is Lovable secure?, Is Bolt secure?, Is Replit secure?, and Is v0 secure?.
What Cursor's security page covers
Cursor's security page, updated 25 Aug 2026, describes how Cursor approaches security for the editor and its infrastructure. It says Privacy Mode can be turned on in settings or by a team or enterprise admin, that it is available on free and Pro, and that when it is on Cursor will not train on your data. It also says Cursor holds AIUC-1, ISO/IEC 27001:2022, and ISO/IEC 42001:2023 certifications, and a SOC 2 Type II attestation, with reports on request at trust.cursor.com. Those statements are about Cursor. They do not tell you whether a route the agent wrote checks the caller, or whether a second user can read the first user's rows.
The same page points at the agent docs for how to use the product. That is the rest of this page, plus the code you still read before you ship.
Privacy Mode and what still leaves the machine
Cursor's privacy help says that when you use AI features, Cursor sends prompts and code context to model providers. It names OpenAI, Anthropic, and Google as examples. Privacy Mode means that code is not used for training by Cursor or those providers. It does not mean the prompt stays on your laptop.
Turn it on from Cursor Settings. On a Mac that is Cmd+Shift+J. On Windows and Linux it is Ctrl+Shift+J. Then General, and the Privacy Mode toggle. For teams, the same page says Privacy Mode is on by default, and an admin can enforce it from the dashboard so members cannot turn it off. It also says Privacy Mode is on by default for Enterprise teams.
Cursor's data use page, updated 3 Sep 2026, says that with Privacy Mode on, customer data is not used for training, and that Cursor has zero-data-retention agreements with providers so they will not store or train on that data. It also says providers, including Cursor, may run risk classifiers, and that if a prompt triggers an abuse detector the data may be stored for that investigation and then deleted under the provider's retention policy. Models that are not covered by those agreements are marked as such, or need an admin to opt in. If Privacy Mode is off, Cursor says it may use and store codebase data, prompts, editor actions, and code snippets to improve its features and train its models.
Two limits are easy to miss. The privacy help says zero data retention does not apply when you use your own API key. Your provider's policy applies instead. The data-use page says that even with your own key, the request still goes through Cursor's backend, because that is where the prompt is built. The same page says Cursor temporarily caches file contents to cut latency. Those files are encrypted with client-generated keys that exist on Cursor's servers only for the request, are not kept permanently, and are not used as training data when Privacy Mode is on.
Do not paste a production secret into chat. The prompt is part of what gets sent. A training switch is not a reason to put a live key in the box.
Secrets in files the agent can read
Cursor's ignore file reference says a .cursorignore in the project root uses .gitignore syntax. Matching files are blocked from Agent, Tab, and @ mentions. The help page says Cursor already ignores .env files, .git/, and lockfiles, and that it also respects .gitignore. The reference's default list includes .env*. A global ignore list in user settings is empty until you add patterns. The docs suggest **/.env, **/.env.*, **/credentials.json, **/secrets.json, **/*.key, **/*.pem, and **/id_rsa when you want those patterns in every project.
The same pages say this is not a hard wall. The reference says terminal commands and MCP tools cannot be blocked by .cursorignore, and that complete protection is not guaranteed because a model is unpredictable. The help page says those tools run outside Cursor's file access controls and may still read an ignored file. A command you approve can print .env. The longer file setup is in how to secure a Cursor-built app and how to keep API keys out of AI-generated code.
Agent, terminal, and MCP
Cursor's agent security page says agents can behave unexpectedly because of prompt injection, hallucinations, and other issues, and that sensitive actions ask for approval by default. Reading files and searching code do not ask. Edits to ordinary workspace files do not ask either, and they are saved to disk immediately. Configuration files do ask. If auto-reload is on, an edit can run before you have read it. Use version control so you can revert.
Terminal commands ask by default. Run Modes are how you let some calls through. They are set under Settings, Agents, Approvals & Execution.
- Auto-review is the mode Cursor calls the safest useful setup for most people. Allowlisted calls run immediately. Other shell commands run in the sandbox when they can. Everything else goes to a classifier. Cursor says the classifier can allow a call you would have blocked. It is not a security boundary.
- Allowlist runs what you listed, with optional sandboxing, and no classifier.
- Run Everything runs every tool call with no sandbox and no classifier. Cursor describes it as the mode you pick when you accept that risk and want no prompts.
Sandboxing limits where a supported terminal command can read, write, and connect. Network is blocked by default inside the sandbox, then opened by your network mode. Cursor says some commands need full system access, leave the sandbox, and ask you. File-deletion protection, external-file protection, and browser protection can still require approval when a mode would otherwise run the call. Team admins can override which modes members may use. The dashboard setting wins over a personal one.
Cloud Agents are separate. The run-modes page says they do not use Run Modes. They run on their own machine and do not ask you to approve each action.
MCP is a third-party tool connection. Agent security says you approve the connection, and then each tool call, unless you allowlist that tool. Cursor's MCP page says to install servers only from developers and repositories you trust, to read what data and APIs the server will touch, to use restricted API keys, and to review the source for anything you depend on. It also says an MCP server can access external services and run code on your behalf. Enterprise admins can allowlist servers from the team dashboard. A personal account does not have that switch. The install and hook details are in the Cursor settings guide.
A file the agent reads is context, and reading does not ask first. Cursor names prompt injection as one reason an agent can do something you did not intend. Treat a surprising instruction in a repo file, or in a page the agent pulled in, as something to read before you approve the command that follows it.
Workspace trust exists and is off by default. The agent-security page says that when you turn it on, a new workspace asks you to choose normal or restricted mode, and that restricted mode breaks AI features. For a repo you do not trust, Cursor says to use a basic text editor instead. The setting is security.workspace.trust.enabled in user settings. Organizations can force it with MDM.
What to check in the code it writes
The editor settings do not review the app. Before you deploy, read the diff for the patterns these guides already cover:
- A key written into source so a script would run. How to keep API keys out of AI-generated code, then API keys in the frontend for the public bundle.
- A route or server action that changes data and does not check who is calling. The pass is the pre-launch checklist.
- Supabase tables the client can reach with row level security off. Supabase RLS for an AI-built app.
- A handler with no limit on sign-up, mail, or model calls. Rate limiting.
- A Stripe webhook that trusts the browser. Stripe webhook verification.
- A CORS header of
*on a route that uses cookies or an Authorization header. Read that handler. There is no separate switch in Cursor for it.
Then run a free passive check on the URL you will share. The check does not read your Cursor settings. The worksheets are the checklist pack and the pre-launch checklist. If you want production errors in one place, Sentry is the directory entry, and the setup notes are Add Sentry to a vibe-coded app.
If a key already left the machine
Rotate it at the vendor, then remove it from the repo. Deleting the line does not retire the key. A GitHub token is Leaked a GitHub token?. A Supabase secret or service-role key is Service role key leaked? What to do.
FAQ
Does Privacy Mode keep my code on my machine?
No. Cursor's privacy help says AI features send prompts and code context to model providers, and that Privacy Mode means that code is not used for training. Your own API key is outside Cursor's zero-data-retention terms, and the data-use page says the request still goes through Cursor's backend. Do not put a production secret in the chat.
Will .cursorignore stop the agent from printing .env?
It blocks Agent, Tab, and @ mentions. .env* is on Cursor's default ignore list. The ignore-file doc says terminal commands and MCP tools do not honor .cursorignore. A command or a server you approve can still read the file.
Does Auto-review mean each command is safe?
No. Cursor says Auto-review is the setup it recommends for fewer prompts, and that the classifier can allow a call you would have blocked. Run Everything turns the prompts off. Cloud Agents do not use Run Modes and do not ask per action. Read the diff either way.
Where is the settings walkthrough?
How to secure a Cursor-built app is the longer pass: ignore files, rules, MCP, and hooks. Ship a Cursor app is the short list. Cursor is the directory entry.
Sources
Checked 17 Nov 2026.
Informational only. This page describes checks and vendor documentation. It is not a security audit, a penetration test, or a certification, and it is not a guarantee.
Newsletter
A short weekly note on new tools and security checklists. No spam, unsubscribe anytime.