Ignore specific files e.g. .env

Is there a way to isolate files (e.g. .env) from being used in anything touched by AI (and possibly sent to the analytics service) ?

1 Like

you can put them in a .cursorignore anywhere in your repository

Thanks! Was looking exactly for this.

Idk if that’s the same thing, but based on recent discoveries how GPT exposes some data (https://twitter.com/petergyang/status/1722846616896651336), might I suggest ignoring indexing of known sensitive files (like .env) by default? I’ve been using Cursor for 2 months and had no idea about this, wasn’t even considering it as a security risk up until now. Granted, my own uneducated mistake, but I think it’ll be a good onboarding step to cover to ensure end-user security.

Just a suggestion thought!

1 Like