Live data from Hacker News

Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

trigger.dev

121–130 of 191 posts

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#121

Earlier quoted context omitted.

Typical defense against this is to mount all user-writable filesystems as `noexec` but unfortunately most OSes don't do that out of the box.

I remember you could trivially circumvent that with „/lib/ld-linux.so “. Does that no longer work?

noexec now prevents mmaping files on that filesystem as executable.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#122
It’s almost like Microsoft sells security products and runs the most insecure JavaScript package manager to build those security products and couldn’t switch off of it even if the engineers in the org recommended a more secure JavaScript execution context— and that’s realistically why anthropic bought an engine.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#123

>Running npm install is not negligence. Installing dependencies is not a security failure. The security failure is in an ecosystem that allows packages to run arbitrary code silently. No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. You only have "secutity" to the extent that you can trust the people who control those packag…

> No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight.

Could you explain how you'd design a package manager that does not allow that? As far as I understand the moment you use third party code you have to trust to some extent the code that you will run.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#125

>Running npm install is not negligence. Installing dependencies is not a security failure. The security failure is in an ecosystem that allows packages to run arbitrary code silently. No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. You only have "secutity" to the extent that you can trust the people who control those packag…

> No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. Could you explain how you'd design a package manager that does not allow that? As far as I understand the moment you use third party code you have to trust to some extent the code that you will run.

They can't explain, it's just victim blaming. The market currently doesn’t have a proper solution to this.

Everyone works with these package managers, I bet the commenter also has installed pip or npm packages without reading its full code, it just feels cool to tell other people they are dumb and it's their own fault for not reading all the code beforehand or for using a package manager, when every single person does the same. Some just are unlucky.

The whole ecosystem is broken, the expectations of trust are not compatible with the current amount of attacks.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#126

Earlier quoted context omitted.

> Running npm install is not negligence. Installing dependencies is not a security failure. The security failure is in an ecosystem that allows packages to run arbitrary code silently. This is wildly circular logic! "One person using these tools isn't bad security practice, the problem is that EVERYONE ELSE ["the ecosystem"] uses these tools and doesn't have higher standards!" It should be no shock to anyone at this…

So do you actually agree or disagree that there's something wrong with npm? It reads as if you were playing both sides, just to land on blaming the individual each time. Even if this was actually some weirdly written plea to shared responsibility, surely it makes sense that in a hierarchy, one would proritize trying to fix things upstream closer to the root, rather than downstream closer to the leaves, doesn't it? >…

I can’t speak for majormajor but I thought the language was kind of funny. “The problem is an ecosystem that allows packages to run arbitrary code silently” is an odd statement because for many people that’s kind of what a package manager does.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#127

>Running npm install is not negligence. Installing dependencies is not a security failure. The security failure is in an ecosystem that allows packages to run arbitrary code silently. No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. You only have "secutity" to the extent that you can trust the people who control those packag…

> No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. Could you explain how you'd design a package manager that does not allow that? As far as I understand the moment you use third party code you have to trust to some extent the code that you will run.

Can we design something like virustotal setup? (https://en.wikipedia.org/wiki/VirusTotal)

NPM setup similar dl_files_security_sigs.db .database for all downloaded files from npm in all offline install? List all versions, latest mod date, multiple latest crypto signatures (shar256, etc) and have been reviewed by multiple security org/researchers, auto flag if any contents are not pure clear/clean txt...

If it detects anything (file date, size, crypto sigs) With proper (default secure) setup, any new version of npm downloads (code, config, scripts) will auto trigger stop download and flagged for global security review by multiple folks/orgs.

When/if this setup available as NPM default, would it stop similar compromise from happen to NPM again? Can anyone think of anyway to hack around this?

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#129

> """ I'm strongly in favor of blocking post-install scripts by default. :+1: This is a change that will have a painful adjustment period for our users, but I believe in ~1 year everyone will look back and be thankful we made it. It's nuts that a [pnpm|yarn|npm] install can run arbitrary code in the first place. """ - a pnpm maintainer 1 year ago https://github.com/pnpm/pnpm/pull/8897

And yet here we are…

Convenience trumps security every time. With people who allegedly know better.

Re: Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

#130
post #127

Earlier quoted context omitted.

> No, your security failure is that you use a package manager that allows third-parties push arbitrary code into your product with no oversight. Could you explain how you'd design a package manager that does not allow that? As far as I understand the moment you use third party code you have to trust to some extent the code that you will run.

Can we design something like virustotal setup? ( https://en.wikipedia.org/wiki/VirusTotal ) NPM setup similar dl_files_security_sigs.db .database for all downloaded files from npm in all offline install? List all versions, latest mod date, multiple latest crypto signatures (shar256, etc) and have been reviewed by multiple security org/researchers, auto flag if any contents are not pure clear/clean txt... If it detect…

How would you identify "security researchers" and tell them apart from the attacker in a trench coat?

After you've done that, why would these supposedly expert security researchers review random code in your package manager?

Post reply on HN