caelo

Caelo › Guides › Is my Cursor app secure?

Is my Cursor app secure? What Cursor protects and what it does not

By Arthi Arumugam, Irth Labs · Published · Updated

Short answerCursor is an editor, so it does not secure the app it helps you write: the code ships with the access rules you asked for, and often without the ones you did not. Cursor's guardrails, such as command approvals and .cursorignore, protect your machine and files while the agent works. Check for keys in source and in .cursor/mcp.json, secrets behind NEXT_PUBLIC_ or VITE_, server-side checks on every route, and how much the agent may run without asking.

The self-check

  1. Keys in source. Search what git tracks: git grep -nE "sk_live_|sk-[A-Za-z0-9_-]{20,}|AKIA|ghp_|service_role". Anything real belongs in a server-side environment variable, and must be rotated if it was ever committed (see our guide on leaked keys).
  2. Keys in .cursor/mcp.json. Project MCP servers are configured in .cursor/mcp.json inside your repo. If it holds a token, replace the value with ${env:NAME} so Cursor reads it from your environment, then check git log -p --all -- .cursor/mcp.json for keys committed earlier. See our MCP config guide.
  3. Browser-exposed variables. Search for NEXT_PUBLIC_ (Next.js) and VITE_ (Vite). Both frameworks copy these values into the JavaScript sent to every visitor, so none of them may hold a secret.
  4. Server-side checks. For each API route or server action that returns private data, call it signed out, for example curl -i https://your-app.com/api/your-route, and again as a second test user. You should get 401 or 403, never another user's data.
  5. .env files. Run git ls-files | grep -i "\.env". Only an .env.example with placeholder values should appear, and .gitignore should list .env* followed by !.env.example (without the second line, git ignores the example file too). Cursor keeps .env files out of AI context by default, but that does not stop git from committing them.
  6. Run mode. Open Settings, Agents, Approvals & Execution. Run Everything runs every tool call automatically. Auto-review and allowlists cut prompts, but Cursor's docs call them best-effort guardrails, not a hard security boundary. Also, .cursorignore blocks the agent's file tools only: terminal commands and MCP tools can still read ignored files.
  7. Repos you did not write. Workspace trust is off by default in Cursor. Before opening an unfamiliar repository, enable it with "security.workspace.trust.enabled": true in your user settings.json, or open untrusted code in a plain text editor, as Cursor's docs suggest.

What does Cursor protect, and what is still your job?

AreaCursor does thisStill your job
Your machineAsks before terminal commands by default. Each MCP tool call needs approval unless you allowlist it.Keep approvals on, review your allowlist, and avoid Run Everything on unfamiliar code.
Files the agent sees.cursorignore and .gitignore keep files out of AI context, and .env files are ignored by default.Remember terminal commands and MCP tools can still read ignored files.
MCP credentialsSupports ${env:NAME} interpolation in mcp.json.Keep literal keys out of .cursor/mcp.json.
Code reviewSecurity Review and the /review-security skill check changes and pull requests for security bugs.Test your own sign-in and data rules. A review is not proof the app is safe.
Your deployed appNothing. Cursor does not host or configure it.Secrets, database rules, server-side checks and payments.

If you find a problem

Rotate exposed keys first, then fix the code and re-test signed out and as a second user. If your app uses Supabase, see our Supabase RLS guide.

Or have it checked: the Irth Labs App Health Check is $490, a written report within 48 hours with a fixed repair price.

1. Run the free local check

npx caelo .

Caelo is a free, open source (MIT) command line tool and MCP server from Irth Labs that checks the files of an AI-built app for exposed API keys, Supabase and Firebase misconfigurations and .env files with real values. It runs on your machine, uploads nothing and uses no AI model. Each finding comes with a plain-English fix.

2. Act on a finding

Follow the fix in your report and run Caelo again. If Git could commit an untracked file containing secrets, preview a US$19 quick fix for that file.

For findings that need an engineer, Irth Labs offers a US$490 App Health Check. You receive a written report within 48 hours and a fixed repair quote. The fee counts toward the repair if you proceed.

Book the App Health Check See repair services

Questions

Does .cursorignore protect my secrets?

Partly. It keeps files out of the agent's file tools and AI context, and Cursor ignores .env files by default. Cursor's docs say terminal commands and MCP tools run outside those controls and may still read ignored files. It also does nothing about what you commit or deploy.

Is it safe to commit .cursor/mcp.json?

Yes, if it holds no literal secrets. Use ${env:NAME} for every key and token, and set the values in your shell profile or system environment.

Is Cursor itself insecure?

This is about apps built with it, not the editor. The same app checks apply to Lovable, Bolt, Replit and v0 apps.

Sources