Dev.to Security 🔐 Cybersecurity 👁 1 📖 1 min read

Does it bug anyone else that Cursor/Claude can read your .env?

Was debugging with Cursor the other day and it just casually cat'd my .env to "check the config". Sat there for a sec like... wait, my OpenAI and Stripe keys just went into the model's context? Tried .cursorignore but a

Noe Lienard
Noe Lienard

Posted on Jun 16

Does it bug anyone else that Cursor/Claude can read your .env?

Was debugging with Cursor the other day and it just casually cat'd my .env to "check the config". Sat there for a sec like... wait, my OpenAI and Stripe keys just went into the model's context?

Tried .cursorignore but apparently in agent mode it can still read whatever it wants via the shell.

Maybe I'm being paranoid. Do you guys actually care about this, or is it a non-issue in practice? Curious how people handle it (or if they just don't).

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.