Live data from Hacker News

Over 100k Infected Repos Found on GitHub

apiiro.com

91–100 of 187 posts

Re: Over 100k Infected Repos Found on GitHub

#91

As well as this being our regular reminder to be careful what you pull from public repositories and other sources, and to verify your dependency trees, it raises another question: If malware is massively prolific in public repos, how much does this affect LLMs and other automation tools that are trained using the contents of such resources? What are the chances that we'll see copilot & friends occasionally emit malwa…

I'm less worried about backdoors accidentally appearing in LLM output and more worried about backdoors being placed into LLM output by 3 letter agencies. Maybe not today, but certainly in a few years time.

Wouldn't it be easier (since they probably have very skilled programmers working for them) and way, way more effective to just set up a team and create a quality open source project with one or two extremely stealthy backdoors?

Or just pay or threaten a struggling company or dev to insert them?

Re: Over 100k Infected Repos Found on GitHub

#92
post #8
post #4

Despite its possibilities, GitHub cannot prevent all this - what happens to the other providers such as Codeberg, etc.?

I don't know but I guess the smaller fish are protected by virtue of them not being worth the automation effort. A bad actor can spend a lot of time and effort attacking Github and have their efforts exposed to so many more developers than the same sort of effort on, say, Codeberg would achieve.

And you'd be shooting yourself in the foot anyway. At "codeberg scale" it's possible to entirely take over the platform with spam and malicious repos, at which point codeberg will implement drastic limits to prevent this like manual account verification or some such, which will stop it. It would be an enormous waste of time for everyone.

Re: Over 100k Infected Repos Found on GitHub

#93
post #13

Earlier quoted context omitted.

Where's GitHub Fraud Detection Team?

busy blocking the co-founder https://twitter.com/defunkt/status/1754610843361362360

That sort of thing happens because there's so much spam and malicious activity, such as the thing reported in this story.

Re: Over 100k Infected Repos Found on GitHub

#94

Wonder if the whole curl + sudo shell script installer thing is going to come to an end any time soon? aka the whole "just run 'curl https://somesite/install.sh ' | sudo sh" to install our software Seems like it'd go very hand in hand with this infected stuff mentioned in the article.

I can approve this from our findings (author of this research): our system lists around 100 instances of the pattern you've mentioned every week, and around %3 are malicious. It would be great seeing it coming to an end.

Re: Over 100k Infected Repos Found on GitHub

#95
post #3

I've noticed these too by randomly stumbling over similar repos. I usually don't run code from random repos, but now I have reached a point where I spin up a sandbox vm even when I trust the repo and the owners. If you are a dev today, you should probably have at least thee firmly separated environments for work, hobby and personal stuff.

> If you are a dev today, you should probably have at least thee firmly separated environments for work, hobby and personal stuff. The complexity of digital life takes on dimensions that make me doubt whether it can continue in the long term.

Indeed. My parents (age 80+, father was an engineer and gadget freak) flatly refuse to use smartphones. My dad has a bit of trouble with the new big-screen TV but can figure things out. My mom just can't cope with the new remote and user interface. My dad's enough on the ball that he doesn't fall for scams, but I despair for people who aren't prepared for this (or who don't realize that email is untrustworthy).

All this digital stuff falls naturally to me, but for the most part, people my age and older really don't cope well with the digital world. I'm an exception because I got my feet wet in the mini/timesharing environment, just as personal computing was beginning to take off, and didn't lose interest.

Also, how well are we really teaching the next generation? I see both good and bad in that regard, with Pi, Arduino, etc. being the brightest spot, and locked-down ecosystems and pervasive surveillance the darkest.

And, of course, there's the whole culture problem. The notion of "computer literacy" went from "knowing how to use a computer" to "knowing how to use Word and Excel" almost overnight. Are schools actually using things like the Pi and Arduino, or are we leaving it to parents to get such things into their hands?

Re: Over 100k Infected Repos Found on GitHub

#96
post #91

Earlier quoted context omitted.

I'm less worried about backdoors accidentally appearing in LLM output and more worried about backdoors being placed into LLM output by 3 letter agencies. Maybe not today, but certainly in a few years time.

Wouldn't it be easier (since they probably have very skilled programmers working for them) and way, way more effective to just set up a team and create a quality open source project with one or two extremely stealthy backdoors? Or just pay or threaten a struggling company or dev to insert them?

its all about ease.

easier to clone and infect existing ones. what you are describing might be effective but would be orders of magnitude more time consuming.

cloning and infecting provides 100x more opportunities because these are already popular repos

as to paying or coercing someone, again it costs time and money. far easier to just abuse this loophole

Re: Over 100k Infected Repos Found on GitHub

#97

This sucks. Supply chain is such an issue. Even tho we don't currently target any npm releases, I make use of socket.dev to monitor my project by creating an npm release for it. But my project BrowserBox (lightweight virtualized web browser) only uses ~800 dependencies including all descendents, with only 19 top-level deps (cool your heels non-JavaScript folks, this is comparatively lightweight for a full stack boing…

"only uses ~800 dependencies" slightly horrifies me.

I was horrified to see how much time I started spending fussing with dependency hell after I moved from .NET to Java about 10 years back. And I am currently horrified by how much time I have to spend doing vulnerability updates and fussing with dependency hell in both Java and Python projects nowadays.

I think maybe the reason I didn't have this problem to nearly the same extent in .NET is that .NET was relatively late to the automated package management scene. NuGet is relatively young, and, as of the last time I got paid to do .NET work, very few of the projects I worked on had actually adopted it yet. So, at least back then, .NET had a stronger culture of well-focused projects that didn't take on enormous transitive dependency trees.

I would also compare this to the recent news about Boeing. Theories abound about why it's gone down the tubes. The one that I find most compelling, though, is that, over the past couple decades, they have focused on moving more of their production out to third-party suppliers, and also cost optimizing their outside supply chain. And that has made their supply chain increasingly difficult to actually manage. The details are different, but in broad strokes it looks a lot like modern software engineering culture regarding supply chain - and some have even argued that this is where Boeing got the idea.

Meanwhile, the place I've worked where I found dependency management to be the least annoying - and where we had the fewest problems with quality - was a financial firm that had banned package managers for supply chain security reasons. There's something to be said for code that absolutely will not change unless you explicitly change it. I've heard similar sentiments expressed by friends and acquaintances who work at Google.

We did write a lot of stuff for ourselves where others would just import a package, and that was good, too. The in-house implementation would do just what we need, and be held to a higher coding standard. So it was easier to understand, easier to debug, and easier to modify as requirements change. And here's the thing: writing it in the first place is a one-time cost, and one-time costs have good amortization characteristics. The recurring costs of dealing with code that's trying to be everything to everybody can easily be greater in the long run. They generally don't amortize; they compound.

Rich Hickey really got me to see how this kind of phenomenon works in his talk "Simple made Easy." Long story short, simple is different from easy. The simpler option tends to look harder up front. But it also tends to be easier in the long run, after you give second-order effects some time to take their toll.

Re: Over 100k Infected Repos Found on GitHub

#98

Github is failing the same way usenet failed: everybody could post stuff to usenet just like everybody can create a github repository and there is nothing that sets an official repository apart from a spammers repository. When Amazon has "the everything store" as main strategic goal, they get hit by "90% of everything is junk". So they end up being a store of mostly junk. Github should figure out if their product is…

> or it is "I can trust this code".

what might be better would be some kind of trust layer built into package managers so they (optionally) only allow verified repos to be installed

Re: Over 100k Infected Repos Found on GitHub

#99

As well as this being our regular reminder to be careful what you pull from public repositories and other sources, and to verify your dependency trees, it raises another question: If malware is massively prolific in public repos, how much does this affect LLMs and other automation tools that are trained using the contents of such resources? What are the chances that we'll see copilot & friends occasionally emit malwa…

Given the code that I've seen LLMs write so far I'm not too worried for now. They are very useful to write a lot of boilerplate code quick so I use them, but they also tend to write the wrong code often and so when I use them the code is well reviewed.

Of course if this is underhanded code (not to be confused with obfuscated - I won't accept obfuscated code from LLMs) I might miss things.

Re: Over 100k Infected Repos Found on GitHub

#100
post #94

Wonder if the whole curl + sudo shell script installer thing is going to come to an end any time soon? aka the whole "just run 'curl https://somesite/install.sh ' | sudo sh" to install our software Seems like it'd go very hand in hand with this infected stuff mentioned in the article.

I can approve this from our findings (author of this research): our system lists around 100 instances of the pattern you've mentioned every week, and around %3 are malicious. It would be great seeing it coming to an end.

Yeah. Security aware people have complained about this pattern forever, but then places like macOS Homebrew (brew.sh) just knowingly do it anyway. :(
Post reply on HN