Live data from Hacker News

Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

semgrep.dev

171–180 of 196 posts

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#171

Earlier quoted context omitted.

I'm guessing it ultimately comes down to the legal / financial / career incentives. My impression is that the market currently rewards visible software functionality with little concern for invisible risk. If we flipped the script, and investors were personally, criminally, and civilly liable for computer breaches, I imagine this problem would disappear almost overnight.

I'm at a defense contractor so the whole scene is alien to me. I don't really even get the desire to produce code more quickly since for us client verification and approval is always the slow part. Producing software more quickly would just make that problem worse.

I'm curious if LLMs would be useful for code understanding and for bug hunting in an environment like that.

Are there any good models for those tasks that can work in an air-gapped enclave?

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#172

Disclaimer: I've never used pytorch and I also know nothing about software security practices. But I don't see a scenario where pytorch needs network access. It seems wrong that at any level within the codebase I can import any module and use its API. I think there need to be additional import restrictions or static analysis. This also seems like languages do not have the right abstractions to talk about this stuff.…

The python ecosystem will never permit this, but I sure wish this topic was better understood and appreciated within it. I hate to generalize, but the AI dev community in particular seems to favor convenience over every other consideration.

For example, the norm for projects is to happily automatically download large models upon first use. Often you can disable this, but the deep layering of code classes throughout various libraries makes discovering the right parameters a PITA.

It is great that you can bootstrap complex things (toys, more often than not) so painlessly, but I find the permissiveness quite jarring. The first troubleshooting step always seems to be “pip install …” and some environments (e.g. MacOS) don't virtualize GPU access well.

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#173

Earlier quoted context omitted.

I'm at a defense contractor so the whole scene is alien to me. I don't really even get the desire to produce code more quickly since for us client verification and approval is always the slow part. Producing software more quickly would just make that problem worse.

I'm curious if LLMs would be useful for code understanding and for bug hunting in an environment like that. Are there any good models for those tasks that can work in an air-gapped enclave?

We do have a phi4 installation in the compartment though it's separately compartmented from the rest of the network. It seems pretty good at doing call graphs. It's slower than ctags but can pull more context with it.

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#174

Disclaimer: I've never used pytorch and I also know nothing about software security practices. But I don't see a scenario where pytorch needs network access. It seems wrong that at any level within the codebase I can import any module and use its API. I think there need to be additional import restrictions or static analysis. This also seems like languages do not have the right abstractions to talk about this stuff.…

> But I don't see a scenario where pytorch needs network access.

Training models across multiple compute nodes? That’s a big one.

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#175
post #22

I cant wait to have no dependencies. An extreme example is now when I make interactive educational apps for my daughter, I just make Opus use plain js and html; from double pendulums to fluid simulations, works one shot. Before I had hundreds of dependencies. Luckily with MIT licensed code I can just tell Opus to extract exactly the pieces I need and embed them, and tweaked for my usecase. So far works great for hobb…

Do you have this on a shareable place / forge? I have a farm animal spelling game and want to extend my library and build more ideas.

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#176
post #163
post #32

This might just be the frequency illusion at play, but there seem to have been a number of high-profile supply chain attacks of late in major packages. There are several articles on the first few pages of HN right now with different cases. Looking back ten years to `left-pad`, are there more successful attacks now than ever? I would suspect so, and surely the value of a successful attack has also increased, so are we…

The reason is that auto-updates and CI tools have reached a critical saturation and everybody uses them. Years ago, `npm install` would have been more likely to be run manually, and only if something in the build breaks - which means once in a blue moon. Supply chain attacks depend on people (or more likely, pipelines) mindlessly auto-updating packages as soon as they are released.

it's almost like we need a better way to understand what's in a package update than the "semantic versioning" honor system!

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#178

One thing that makes me wonder is that there are 4 security issues raised and all of them were automatically commented and closed by some bot called `pl-ghost` [1][2][3][4]. In the end, only this one [4] properly handled, and all bot comments are deleted. You can see the bot comments in another report [5], which is more informative than the OP one. [1] https://github.com/Lightning-AI/pytorch-lightning/issues/216... […

Andy from Lightning here. Yeah, the PyPi credentials were stolen through the compromised pl-ghost bot account. The attacker used this account to create a new actions workflow, which was ran and parsed out secrets for PyPi. After releasing the package, the attacker then used that account to troll us a bit with those comments.

Re: Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

#179
post #22

I cant wait to have no dependencies. An extreme example is now when I make interactive educational apps for my daughter, I just make Opus use plain js and html; from double pendulums to fluid simulations, works one shot. Before I had hundreds of dependencies. Luckily with MIT licensed code I can just tell Opus to extract exactly the pieces I need and embed them, and tweaked for my usecase. So far works great for hobb…

Now you're exposed to the real dependency, the browser.
Post reply on HN