r/github • • Feb 14 '25

Github Copilot Leaks Peoples Filesystem

Copilot started suggesting a win file path as a comment, even though I'm not running Windows. When I provided the beginning of a C drive path, it randomly completed it with different people's filesystem paths. I assume this comes from its training data.

375 Upvotes

62 comments sorted by

160

u/Boring_Rooster_9281 Feb 14 '25

This kind of behavior is a side effect of AI models trained on large datasets.

10

u/an_ennui Feb 15 '25

this reminds me of when I was writing package.json and for “author” it suggested a very specific (not placeholder) username and email 🙈

11

u/Boring_Rooster_9281 Feb 15 '25

In early access Copilot suggested random API keys on completion.

1

u/No_Toe_1844 Feb 16 '25

And you subsequently met and married them.

1

u/an_ennui Feb 16 '25

we did get married and live a wonderful life together

19

u/Challanger__ Feb 14 '25

But this is the most obvious personal data to manually test/exclude during AI model development, looks like MS AI developers are replaced by AI.

30

u/sha256md5 Feb 14 '25

What makes you think it's real and not hallucinated?

5

u/jmanh128 Feb 15 '25

You know, not something I considered before

1

u/Devatator_ Feb 15 '25

To be honest I don't really care about people knowing about a few paths on my PC. I typically use relative paths but private stuff might have a full path which might be the exact same on someone else's machine minus the username being different

115

u/Comprehensive-Pin667 Feb 14 '25

This is your kind reminder that the tool that you are letting write your code has been trained on data such as the thesis of some dude who doesn't know better than to commit absolute paths to git.

11

u/brabeji Feb 14 '25

and lots of shit tutorial-initialized repos with some begginer level bullshit on top

3

u/ArabicLawrence Feb 15 '25

Hey! I didn’t know better. Now, I do!

1

u/Comprehensive-Pin667 Feb 15 '25

I mean I probably didn't know better back when I was writing my thesis either.

1

u/AlterTableUsernames Feb 16 '25

I mean, this person was writing a thesis on Windows. I did, too. But at least I'm ashamed of it.

1

u/BusinessBandicoot Feb 19 '25

I've always wondered if they could use commit history from larger, longer lived, active projects to try to negatively weight certain antipatterns. For example, I imagine plenty of people have mistakenly commited absolute paths, and then at some point in future commits, that was changed to a relative path or standard location.

13

u/TheTanadu Feb 14 '25

Remember that sometimes people push their drive paths to repos. This particular user... well, pushed to public repo his/her drive paths. Added stuff proposed after /Desktop/ is probably hallucinated, taking into account tons of evidence that other parts of this path is also on GitHub but in other's repos. PEBKAC.

1

u/svick Feb 15 '25

This particular user

That doesn't even seem to be a single person, but multiple people who use "harsh" as their user name and pushed absolute paths with it to GitHub.

27

u/mrkurtz Feb 14 '25

I typed a # yesterday and copilot suggested completing the like with “Copyright 202X Kubecontrol”. I forget if it was 2024 or 2025.

It has gotten BAD.

6

u/Nixinova Feb 14 '25

Putting the cursor at the end of a file is an extremely easy way to get sus hallucinations like that

0

u/anno2376 Feb 15 '25

So you don't review what you have accepted correct?

2

u/mrkurtz Feb 15 '25

I didn’t accept it. It was the suggestion.

3

u/ragnarokfn Feb 14 '25 edited Feb 17 '25

Ah shit you got the directory of my code projects pls do dox or ddos me I'll even pay ransom!

No seriously I don't see the problem here, i̶t̶'̶s̶ ̶m̶i̶x̶i̶n̶g̶ ̶u̶p̶ ̶p̶a̶t̶h̶s̶ ̶o̶f̶ ̶l̶o̶t̶s̶ ̶o̶f̶ ̶p̶e̶o̶p̶l̶e̶,̶ ̶i̶n̶ ̶t̶h̶i̶s̶ ̶c̶a̶s̶e̶ ̶i̶t̶'̶s̶ ̶e̶v̶e̶n̶ ̶s̶w̶i̶t̶c̶h̶i̶n̶g̶ ̶b̶e̶t̶w̶e̶e̶n̶ ̶f̶o̶r̶w̶a̶r̶d̶-̶ ̶a̶n̶d̶ ̶b̶a̶c̶k̶-̶s̶l̶a̶s̶h̶ ̶s̶o̶ ̶U̶n̶i̶x̶ ̶(̶o̶r̶ ̶l̶i̶n̶u̶x̶)̶ ̶a̶n̶d̶ ̶w̶i̶n̶d̶o̶w̶s̶ ̶(̶o̶r̶ ̶m̶s̶-̶d̶o̶s̶)̶ ̶s̶o̶ ̶c̶o̶m̶p̶l̶e̶t̶e̶ ̶n̶o̶n̶s̶e̶n̶s̶e̶.̶

Edit: apparently my comment is partly nonsense thx for telling me :D but my point stands the path is mixed up from lots of paths so I don't see a security problem

3

u/psystarpsy Feb 14 '25

Ah I understand, at first glance I was surprised to see it suggested. I’m more curious why they wouldn’t just to exclude this data on training to prevent these bad suggestions.

2

u/ragnarokfn Feb 14 '25

I don't know for sure if a. I already mentioned a path I wanted to write elsewhere in my project or b. it actually read my comment which said I'm referencing an xlsx file which was located within the project folder and pulled the path from there But i had copilot suggest me the right path multiple times before and I love it.

3

u/p0358 Feb 15 '25

It’s not switching anything, it’s escaping spaces in the folder names with a backslash. Don’t be dumber than an AI hallucination please ;_;

8

u/[deleted] Feb 14 '25

This could also be just a hallucination. The LLM see something science related like trial data and associated this to thesis writing, and come up with some plausible looking path for this (and this duplication of folders in the path is a bit weird looking, but not necessarily unplausible)...

Also the information in this case is not really sensitive and was probably already publicly in some repository on GitHub, if it is really just a reproduction of training data, so not really a "leak"

3

u/jk_tx Feb 14 '25

Everything you say is true and yet it's also damning of LLM. Just wait, eventually some company trying to use AI to cut costs is going to have a breach of sensitive information. It's bound to happen at some point.

3

u/timeparser Feb 15 '25

An LLM hallucination

5

u/becauseimcleverer Feb 14 '25

Always understand that at the end of the day,il it's YOUR code, so you're responsible for what ends up in your own repo. Hallucinations or other people's data, doesn't matter, it's up to you as the developer to exclude bad suggestions.

2

u/TedditBlatherflag Feb 15 '25

Copilot was trained on massive segments of GH open source. 

That includes a lot of random code where people just hard coded and committed stuff they shouldn’t. 

From what I know they tried to exclude lots of sensitive stuff (it won’t autocomplete with a cert key for example). But also lots of non-obvious stuff I’m sure it got trained with. 

2

u/DEZIO1991 Feb 15 '25

My copilot refuses to autocomplete emails and ip addresses already for a long time. Also API Keys and passwords.

1

u/[deleted] Feb 15 '25

How do you know it actually belongs to someone? It could just be making the most statistically likely personal information or path up. I think it’s a separate issue, not a “leak”.

1

u/newbie249 Mar 27 '25

Because it was not just about the file paths, even secret keys, API keys and a lot more stuff of big IT tech giants were also leaked. You can check the news for the same as well.

1

u/adept2051 Feb 15 '25

Try writing a variable or attribute email= and see what it tries to populate for that, if your in your corporate account you’ll find all your public company email addresses to start, if your public you’ll find @example, then @actual addresses, it’s almost amusing.

1

u/[deleted] Feb 15 '25

Think of it as a two-way system. While it compiles and examines your data, it also brings you someone else's compiled and examined data.

Since it groups all the data on Github repositories, it can also fetch the file paths found in the contents of similar files.While I was making vim configurations, it was automatically completing my configurations. For example, when I wrote a snippet, it also suggested plugins from other repositories.

1

u/[deleted] Feb 15 '25

I assume this comes from its training data.

You assume wrong.

It comes from the training data in the sense that everything the model says comes from the training data.

But a specific path it outputs isn't going to be a specific path in the original data...

For each token, it figures out the probability of different possibility, and chooses one (in part randomly, see temperature). So while tokens that are part of the path all come from the original dataset, the complete path does not.

1

u/Front_Fennel4228 Feb 16 '25

Bit why is thesis code inside thesis code which is inside code which is inside work code which is inside thesis ......

Users/harsh/Desktop/Thesis\ Work/Code/Thesis\ Code/Thesis\ Code/Results

1

u/OffThe405 Feb 16 '25

It’s not. You just don’t understand escaping

1

u/Impossible-Owl7407 Feb 16 '25

That's why you do not use AI. It is not even a question if it useful or not. You just provide it your personal information. Which is a big nono.

1

u/Complete_Rabbit_844 Feb 18 '25

Yep, AI hallucinates, always has, always will.

1

u/CoraxTechnica May 26 '25

It's pretty meaningless from a risk perspective. So you know a path. IF you can gain access to that system then you have 1 piece of intelligence about the system's file layout and username.

0

u/anno2376 Feb 15 '25

I assume...

If your goal was a clickbait title, well, you’ve succeeded.

Please educate yourself before spreading so much misinformation.

Or better yet, ask first instead of making false statements.

-2

u/theRealSunday Feb 15 '25

Why use copilot?

2

u/psystarpsy Feb 15 '25

It used to be like a really decent autocomplete. Recently it’s been worse, but it’s really convenient for data analysis scripting, i.e. generating plots.

20

u/[deleted] Feb 14 '25

[removed] — view removed comment

0

u/[deleted] Feb 15 '25

How do you know it actually belongs to someone? It could just be making the most statistically likely personal information up. I think it’s a separate issue, not a “leak”

2

u/redoubledit Feb 15 '25

I checked it and the company was real.

-4

u/[deleted] Feb 15 '25

So? If I give you a piece of paper and tell you to write a company name is that also a leak? Also who are you lol you didn’t write the above comment

8

u/redoubledit Feb 15 '25

No, but I, contrary to you it seems, read the comment above.

The commenter said it was a footer with data from an existing company. „Leak“ just means that whatever you put in there, it will probably end up as a suggestion for someone else. And that webdesign company probably did not plan for this to happen. So it is a „leak“ in that sense.

Also who are you lol

Dude, you seriously write a comment on social media and tell others to not comment?

1

u/[deleted] Feb 15 '25

Neither the commenter nor OP named a company so what are you referring to??

1

u/[deleted] Feb 15 '25

[removed] — view removed comment

1

u/[deleted] Feb 15 '25

Once again, if you think LLMs work by copy-pasting other people’s prompts and showing them to random users you have zero understanding of how they work. The fact that it uses a company name that exists in the real world doesn’t have anything to do with other people’s prompts.

1

u/[deleted] Feb 15 '25

[removed] — view removed comment

1

u/retardedGeek Feb 19 '25

This guy is high on coffee probably

5

u/[deleted] Feb 15 '25

[removed] — view removed comment

-1

u/[deleted] Feb 15 '25

How? It’s just suggesting whatever it makes up. I can write an empty Python script and say df=read_csv and copilot will just suggest some random path. Just because part of the path mentions real names doesn’t mean anything. You seem to still not understand the difference between hallucinating and leaking in this context.

1

u/actualsen Feb 18 '25

You seem to not understand memorization in the context of a deep learning dataset.