Disrupting supply chain attacks on NPM and GitHub Actions
Posted by nyku 5 days ago
Comments
Comment by alpineman 5 days ago
'what time shall we put here?'
'what's the longest hangover you ever had?'
'let's put 72 hours'
Comment by Waterluvian 5 days ago
Comment by datakan 5 days ago
Comment by Waterluvian 5 days ago
I feel like the only way to be wrong for this class of problem is to believe that there's a singular right answer. Just pick something reasonable (like how weekends are a fairly common thing, so don't make it shorter than 48 hours). Start there, then see how much of an issue persists. No matter what, at scale you'll find someone complaining that the number is too little, and people complaining that it's too much. Eventually you just have to tell the complainers to deal with it.
Comment by datakan 5 days ago
Cyber attacks will frequently happen on a Friday just for this scenario, they anticipate no ones looking over the weekend.
Comment by tredre3 5 days ago
Blocking a maintainer from pushing updates for a full month after changing their e-mail would be obviously absurd. So Github would have to add a way of enabling maintainers to super-uper-duper confirm the change and cut the delay short. Which is likely not currently possible, hence starting with a shorter delay.
Comment by Normal_gaussian 5 days ago
Comment by normie3000 5 days ago
Comment by lrvick 4 days ago
Talked to NPM about this when it went viral, and once again all they could say was enabling package signing, even optionally, would discourage inexperienced people from contributing packages as they would be pressured to learn basic security and key management.
Sorry, if you are unwilling to take 10 minutes to learn how to sign your code, you have no business maintaining software releases millions of people depend on. Full stop.
But NPM will not even make it -optional- and rejects all PRs to implement this going back a decade. So no one feels pressured into basic security. Cool.
Comment by e40 4 days ago
The crux of the problem is right here.
Comment by inigyou 4 days ago
Comment by lrvick 3 days ago
Even when you drop off food at a food pantry for consumption by strangers there is a basic expectation it is not spoiled or dangerous.
Comment by summarybot 5 days ago
Comment by insanitybit 5 days ago
I think that cooldowns are mostly dumb but they're very cheap to deploy and they do give other approaches (like scanners) more time to adapt/ do their job.
Comment by summarybot 4 days ago
One reasonable approach is to increase the scrutiny for new releases based on how many active downloads of the package there are. So for new packages, maybe there will be not a ton of scrutiny, but for things that are downloaded by millions of users, like Axios, there would be significantly more scrutiny per release.
The epidemic of "not my job" and "[we] don't get paid to do that" is a large contributor to why the world is so messed up. I don't know what to call this phenomenon. In the Hawaiian language there is a word Kuleana which means "sacred responsibility" or "sacred task." If more people took on their Kuleana joyfully we would be inviting the ideal [realm] more rapidly.
Comment by insanitybit 4 days ago
What you're suggesting is a radical departure from how free software has been distributed historically. That goes well beyond Github and NPM.
Comment by doubled112 4 days ago
Walmart does allow other stores to sell through their website.
Comment by insanitybit 4 days ago
Comment by summarybot 4 days ago
Comment by insanitybit 4 days ago
Comment by summarybot 3 days ago
Comment by insanitybit 2 days ago
Comment by summarybot 55 minutes ago
Github owns and controls NPM, npm is no longer a community-controlled project. Therefore, Github should [happily] take on the duties, responsibilities, and obligations of a software publisher to provide either: trust ratings on packages and code, or literally and not figuratively scan every single package-and-version on npm for appropriateness.
But obviously you already got that point and just wanted to exert some modicum of bossiness and control by having me regurgitate my well-formulated thoughts for a third time while painting inside the lines you insist are relevant.
Comment by inigyou 4 days ago
Comment by lazyasciiart 5 days ago
https://github.blog/changelog/2026-07-28-npm-publish-time-ma...
Comment by lrvick 4 days ago
Comment by zzo38computer 4 days ago
I think one thing that would help is to support mutual TLS, with X.509 certificate chains for authentication. This is more secure than personal access tokens and allows you to issue them to yourself and others without needing to login first, including to specify whatever permissions you want to set (as a subset of the permissions of the issuer) and to make them expire. (You could also store the private keys of one certificate on a separate computer not connected to the internet, and use that to issue another one to yourself to use that one instead, and can use a passworded private key as well (an alternative of 2FA), so you can recover even if your certificate you are using does become compromised, or something deletes it (intentionally or not), and can revoke the ones that are compromised.)
Mutual TLS (and even ordinary TLS) won't solve everything, but in combination with other things, including ability to restrict access to what is needed, and avoiding needing too many dependencies (since, programs that need too many dependencies is also one thing that can cause many problems), and many other things, it can be an additional step to help with security.
Comment by acdha 4 days ago
This adds an large amount of overhead and complexity (i.e. you now need to manage a revocation list) but you didn’t really explain any benefit which isn’t already present except for the possibility of restricting access to the private key. That can have some benefits — e.g. it’d be nice if you could say that releases can only be signed by a particular key stored on a Yubikey with a physical presence check – but I think most of the benefits come not from using x.509 but rather from fine-grained permissions.
Most of the attacks we’re seeing are escalation from an initial minor compromise where an attacker compromised something which had far greater permissions than needed for the task the attacker first exploited, as well as the broken design of GitHub Actions with mutable tags. I don’t think TLS gives us enough to take effort away from working on those.
Comment by zzo38computer 3 days ago
If there is a broken design of GitHub Actions, that is another issue, and neither TLS nor X.509 is the issue with that. (Also, GitHub Actions could hopefully be made to allow finer permissions if the existing permissions are not fine enough; that is not related to X.509 at all.)
Avoiding too many dependencies, is another thing to do.
And, signed releases is another thing to do, and is helpful for additional reasons (unrelated to authentication with GitHub, but useful for knowing that you published it rather than someone else (without having to trust GitHub with it)). The key used to sign the release might or might not match that in the X.509 certificate used to authenticate with TLS; there are some benefits if it does (such as if you have published your certificates that someone else can check, or your mention of Yubikey), but it doesn't have to (e.g. because you have multiple certificates, because multiple people are publishing releases, because you have some other reason to not use the same certificate for the other purpose, etc).
Comment by skipants 5 days ago
Is it purely more secure because they can't exfiltrate your secret keys to publish again?
I feel like if your workflow gets pwned you'd be rotating your keys anyways, so I'm not sure if the vendor lock-in is worth it.
Comment by pimterry 5 days ago
Comment by flyingshelf 5 days ago
Comment by insanitybit 5 days ago
Comment by MSkill1 5 days ago
Comment by Rumudiez 4 days ago
Comment by hncsiocp9x 5 days ago
Comment by pluto_modadic 5 days ago
Comment by hinkley 5 days ago
Comment by TacticalCoder 4 days ago
I'll come and add: "after JavaScript".
Comment by hinkley 1 day ago
Comment by lrvick 4 days ago
Linux package managers like debian/apt also ship hundreds of signed NPM packages. In other words the unpaid Linux community has once again solved a problem Microsoft fundamentally failed to. Some things never change.
Comment by acdha 4 days ago
Comment by lrvick 3 days ago
Comment by effnorwood 4 days ago
Comment by torment-nexus 5 days ago
Comment by receiptincar 4 days ago
Comment by DiabloD3 5 days ago
Comment by theF00l 5 days ago
Comment by DiabloD3 5 days ago
Comment by UqWBcuFx6NV4r 5 days ago
This is a blog post by GitHub. what are you suggesting that these employees do? Simply ignore that they exist? Regardless of whether or not you use them, they still exist.
Comment by DiabloD3 5 days ago
You might not know this, but the world of software development existed before NPM and Github, and it continues to exist after them. You are not beholden to either of them.
Comment by anon48293 5 days ago
The buggy, insecure feature that is GitHub actions? Yes, preferably so.
Comment by sieabahlpark 5 days ago
Comment by x86a 5 days ago
Comment by baby_souffle 5 days ago
Comment by rho138 5 days ago
Quick, everyone break out the pitchforks for a valid analysis of a game! /s