# Cursor security checklist for the app you ship

By Mark Kashef, founder of Lockpick. Published 2026-10-08, updated 2026-10-08.

Cursor writes the code, your host serves the site. What to check in the project, what to check on the live site, and how to fix it from Cursor.

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.

| Framework | Public prefix | Everything else |
| --- | --- | --- |
| Vite | `VITE_` | Stays out of the bundle |
| Next.js | `NEXT_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](/check) on your published address to see what a stranger sees, then read [how we check](/docs/security/how-we-check) for what it covers.
3. [Add Lockpick to Cursor](/docs/ai/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.

## Sources

- [Env Variables and Modes](https://vite.dev/guide/env-and-mode), Vite docs, read on 2026-10-06
- [How to use environment variables in Next.js](https://nextjs.org/docs/app/guides/environment-variables), Next.js docs, read on 2026-10-06
- [Ignore files](https://cursor.com/help/customization/ignore-files), Cursor help, read on 2026-10-06
