gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

GEMINI CLI READS MY USER FOLDER CONTENTS WITHOUT PERMISSION

Open phoebdroid opened this issue 1 year ago • 9 comments

What happened?

So, just installed gemini cli for the first time and while answering a question model says "This assumes you have Python installed and available in your PATH. Based on the files in your Downloads folder, it seems very likely you do." and I was like what? did you go through my folders without asking me? and the model says "Yes. At the beginning of our conversation, you provided a list of files and folders in your C:\Users\myname directory to give me context." and I said "holdon, I did NOT give you a list of my folders, is this default behaviour that you peek through my files" so then I figure out that on every launch gemini CLI goes through the entirety of my user folder (and its subfolders) and send entire structure to google. WITHOUT EVEN ASKING ME OR LETTING ME KNOW OF THIS !!!

Whose idea was this and what kind of privacy breach is this? You think this is ok google ??? I've never consented to such a thing !! WDF ?

What did you expect to happen?

I expected google to NOT scan through my entire user folder

Client information

$ gemini /about
# paste output here

Login information

google account

Anything else we need to know?

No response

phoebdroid avatar Jun 30 '25 13:06 phoebdroid

this also happened to me. seems it is overly excited to check my files, lol

Image Image

epistemicskeptic avatar Jun 30 '25 13:06 epistemicskeptic

well, the issue was I just launched CMD (which by default runs in user root folder) and gemini checks folder structure at launch. So now, I've actually created a project directory and a .bat file to launch Gemini CLI each time from that directory. It still reads my entire launch directory at launch (not really a bad thing tbh and needed for functionality) but at least doesn't dump my entire user directory to google at launch, I really didn't like that.

phoebdroid avatar Jun 30 '25 13:06 phoebdroid

Hey! This is WAI. Currently Gemini CLI uses the working directory's folder structure to help make its responses more helpful. I created #2792 to help track this work. Please follow along there for any updates.

abhipatel12 avatar Jul 01 '25 03:07 abhipatel12

Where does Gemini keep a list of directories it has been authorized to? I would have thought ~/gemini/ but no

paul-hammant avatar Jul 30 '25 13:07 paul-hammant

well, it doesn't get authorized to any directories. Wherever you start it from, say documents/myCLI/ becomes its working directory and ANY directories, sub directories and files within that will be scanned . So you better start it in a sandboxed directory designated for gemini

phoebdroid avatar Jul 30 '25 14:07 phoebdroid

You're right. Maybe it should have the same safety feature of Claude ...

Image

... and keep a note ~/.claude/projects/-home-paul/..... utilizing ~/gemini/ for similar.

paul-hammant avatar Jul 30 '25 14:07 paul-hammant

yep curently none of that, and by default installs to user folder, so the combination means your ENTIRE user folder will be sent to google. I don't know why there is not a bigger fuss about this but ok . . .

phoebdroid avatar Jul 30 '25 14:07 phoebdroid

Same thing happens on Claude CLI, before it used to ask you permision to go on other foldes outside the one it was working but now it just search eveywhee.

anthonystepvoy avatar Jul 30 '25 14:07 anthonystepvoy

Really this is like, the worst behavior I have seen an agent have, like, its crazy, because it will bload his own context window trying to read files outside the scope of the project, not to say about the safety and privacy concerns, this basically renders Gemini useless to most tasks, you have to keep remembering him YOUR WORKING DIR IS ./ no other LLM agent has this behavior, nor codex, neither does Claude, and even smaller more niche scaffolds like Factory's droid...

I'm sorry guys but, keep pushing tons of updates per week is not making gemini-cli any better really, the pain-points are the same, and growing.

ceoz-0 avatar Oct 16 '25 15:10 ceoz-0