Live data from Hacker News

Keyv and friends compromised in active Shai-Hulud supply chain attack

aikido.dev

51–60 of 145 posts

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#51
post #39
post #32

Earlier quoted context omitted.

You will also not get very far in engineering if you have a production incident, someone proposes a thing that will mitigate it partially but significantly, and you insist that we can't deploy that mitigation because we need to do the multi-year project that will actually fix it instead. Even if we still need that project, we also need that mitigation. Sure, solve the problem of "auditing and trusting codebases". Go…

Feel free to turn it off yourself, just don't be surprised when the attackers switch tactics. And don't make life harder for everyone else by pushing it as mandatory. (if you want a better mitigation: don't automatically update dependencies in CI. At a minimum have a cooling-off period that you only bypass on manual review. This is not hard to implement and at least gives some time for alarm bells to be sounded befor…

> if you want a better mitigation: don't automatically update dependencies in CI. At a minimum have a cooling-off period that you only bypass on manual review. This is not hard to implement and at least gives some time for alarm bells to be sounded before you're pwned.

One of the problems a lot of companies are having right now is trying to determine a proper window size between CVE release and patching.

On one hand, you have LLM created 0days and attacks are happening almost as fast as CVEs can be posted, and CVEs are being posted at lightning speed. You maybe had a month or a few weeks to patch before, now the window may be down to days or even hours.

On the other hand, you want to prevent these repo bombing attacks.

There's a tension there but I think we're going to end up measuring that window in hours within the year, if we're not already there.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#52
post #46

Earlier quoted context omitted.

Yes, you should separate "tests execute" into their own unprivileged workflows that don't have "deploy" secrets.

You can also do the same for the build workflow, no?

Yep, I'd recommend it.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#53

Earlier quoted context omitted.

This is the most boring comment posted on every one of these. NPM is by no means the worst offender here and offers a ton of solutions to this, lots of package managers are behind it or equivalent. NPM gets targeted a lot because it's popular. That's it.

> NPM is by no means the worst offender here Ok, I can agree it is a boring comment, but who is worse? NPM gets targeted both because it is popular and because there is a wider attack surface (lots of little packages promoted by a huge variety of users) I have a high schooler who published work a couple weeks ago. This is good, but it comes with downsides. Maybe a couple more speed bumps or classifiers would be helpf…

Arguably crates.io is worse. NPM has cooldowns and has for a while, it has had Trusted Publishing for longer, it has human-approved releases that separate CI/CD from actual publishing. Ruby is probably worse in every way.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#54

Earlier quoted context omitted.

This is the most boring comment posted on every one of these. NPM is by no means the worst offender here and offers a ton of solutions to this, lots of package managers are behind it or equivalent. NPM gets targeted a lot because it's popular. That's it.

Other than what happened with 'xz', which was upstream of it getting packaged, how many times has this happened in the debian packages system? Also very popular.

I don't consider these comparable in any way that's worthwhile. The scale and goals are completely different.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#55
post #19

Earlier quoted context omitted.

The fact that it's not sufficient also largely means it's not necessary either, because the real solution is auditing and trusting the codebase as a whole. All you do when disabling install hooks is make a lot of situations much more difficult to handle.

Missile defense systems are unnecessary because they could just use tanks Anti-tank measures are unnecessary because they can just use missiles

What's your solution to using a library without executing the code in it?

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#56
post #50

Earlier quoted context omitted.

This is the most boring comment posted on every one of these. NPM is by no means the worst offender here and offers a ton of solutions to this, lots of package managers are behind it or equivalent. NPM gets targeted a lot because it's popular. That's it.

No other package manager is worse than NPM. Outside of its 'popularity', there are several fundamental reasons why this continues to happen to NPM: - Imported packages are not pinned by default. - Typescript / Javascript's lack of a standard library encourages the developer to import more packages into their codebase to address the short-comings which increases the risk of importing a bad package. - Post install scri…

Ruby is worse. crates.io is arguably worse.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#57

Earlier quoted context omitted.

Other than what happened with 'xz', which was upstream of it getting packaged, how many times has this happened in the debian packages system? Also very popular.

I don't consider these comparable in any way that's worthwhile. The scale and goals are completely different.

How are they not comparable?

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#58
I have a suspicion that a lot of these supply chain compromises are done by the security researchers at security vendors, selling software to protect the software supply chain. Spreading fear to create demand for their products.

Like in the good ole days of Windows 98 and antivirus era, a lot of advanced virus techniques in the wild came from the people who used to work for AV companies

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#59
post #51
post #39

Earlier quoted context omitted.

Feel free to turn it off yourself, just don't be surprised when the attackers switch tactics. And don't make life harder for everyone else by pushing it as mandatory. (if you want a better mitigation: don't automatically update dependencies in CI. At a minimum have a cooling-off period that you only bypass on manual review. This is not hard to implement and at least gives some time for alarm bells to be sounded befor…

> if you want a better mitigation: don't automatically update dependencies in CI. At a minimum have a cooling-off period that you only bypass on manual review. This is not hard to implement and at least gives some time for alarm bells to be sounded before you're pwned. One of the problems a lot of companies are having right now is trying to determine a proper window size between CVE release and patching. On one hand,…

If you need quick responses to such things, you're gonna need some intelligence in the loop regardless, even if it's just deciding when it's worth pushing a new release to prod.

Re: Keyv and friends compromised in active Shai-Hulud supply chain attack

#60
post #5

At this point, any package adding a pre-install hook where there previously was not one should be denied and treated with extreme suspicion. It's time pre-install / post-install hooks were killed off. Start with a moratorium on any new ones.

iirc does pnpm not allow them by default. But even if we killed them off there would still be a chance of the malware hooking into something else or only working in cli applications.

npm v12 released last month also defaults into blocking them by default
Post reply on HN