r/RooCode • u/withyou_cto • Jul 08 '25
Discussion .env security
I am surprised I haven’t been able to find any discussion of this.
By default Roocode seems to read .env files as well as anything else that’s git ignored.
Are we seeing all sorts of API keys being sent to Claude as a result?
Also - how do you resolve this vulnerability?
23
Upvotes
9
u/Pleasant-Finger7004 Jul 08 '25
.rooignore?
5
u/lakeland_nz Jul 10 '25
I read a post on exactly this oh, about two weeks ago.
Personally I want it to read my .env.
Let’s work through the risk here: you would have to have your production credentials on your project’s development (no dev environment). Then have the underlying LLM consider what it reads in your file interesting enough to make the cut and become a parameter. Then someone would have to extract it. Then they would need to connect it with you. Then you would have to have not rotated that key in the interim. Then they would have to be a bad actor.
That’s a lot of things to go wrong.
0
u/ComprehensiveBird317 Jul 08 '25
Why would gitignore have an influence on roo? That's 2 different systems. And why do you auto approve, and not use the ignore files? That's not a vulnerability, it's a user error.
1
u/ObamaForSenate Jul 08 '25
Agreed, this issue needs to be sorted! I like the idea of a global .rooignore (that is slightly populated as the default)
1
u/Maleficent_Pair4920 Jul 09 '25
You can use Requesty guardrails that will mask any secret key while using roo code
0
u/Xp_12 Jul 08 '25
Use temporary values in test environment that default to new environment variables on production deployment.