Cursor is reading .env

Feature request for product/service

Cursor IDE

Describe the request

Cursor 2.4 reading .env files.

After the upgrade my .env were not ignored anymore.

I think this is unnacceptable and already happened a lot of times before, in other versions. For all projects that I was writing the .env was accessed by AI. I noticed it after I made a regular change and AI started changing the variables there. Not saying that in next leakage probably my API keys will be publicly accessible

How Models able to read you .env? its tough bash or from tool caling?

yeah im just noticed, usually by default cursor chat or agent cant see it unless it used terminal tools like bash grep and such, but i think you can blocked it by putting .env in the .cursorignore.

Thats what I did. But i think that makes sense to block it by default

Tool call

same bug reported here: Upgrade to 2.4.21 removes global (default) cursorignore