Skip to content Lockpick

Cursor security checklist for the app you ship

Cursor is an editor, so the security of what you ship depends on your framework, your host and the code Cursor helps you write. Check two places, the project and the live site. Atlas, our example app at atlas.example, is the example.

What does Cursor keep out of the AI's context?

Cursor already ignores .env files, .git/ and lock files by default. Cursor also says terminal commands and MCP tools run outside its file access controls, so they may still be able to read ignored files. So a secret in .env is not sent as context by default, but an agent that runs commands can still read it. Approve commands with that in mind.

Which values end up in the shipped code?

That depends on the framework, not on Cursor.

FrameworkPublic prefixEverything else
ViteVITE_Stays out of the bundle
Next.jsNEXT_PUBLIC_Stays on the server

Vite exposes variables prefixed with VITE_ in client-side source code after bundling. Next.js keeps variables without the NEXT_PUBLIC_ prefix out of the browser. A secret with a public prefix is published the moment you deploy.

How to check and fix from Cursor

  1. Deploy and copy the live address.
  2. Run a quick check on your published address to see what a stranger sees, then read how we check for what it covers.
  3. Add Lockpick to Cursor so the agent can read each finding and its fix prompt.
  4. Ask it to fix one finding on a new branch, review the diff, then deploy and check again.

An outside check sees the deployed site, not your repository, so it will not find a secret that never left your machine. It finds the ones that did.

Questions people ask

Does Cursor send my .env file to the AI?

Not by default. Cursor ignores .env files for AI context, but terminal commands and tools the agent runs may still read them.

Can Cursor fix what a Lockpick check finds?

Yes. Add Lockpick to Cursor and ask it to fix one finding at a time on a new branch, then review the change before you deploy.

See what your site shows from outside

A quick check reads your homepage the way a visitor would and gives you a score. No account needed.

Check your site

Sources

  1. Env Variables and Modes Vite docs, read on October 6, 2026
  2. How to use environment variables in Next.js Next.js docs, read on October 6, 2026
  3. Ignore files Cursor help, read on October 6, 2026

About the author

I'm Mark, founder of Lockpick. These pages are drafted with AI and checked against their cited sources before publication. The Updated date changes only when the page itself does.