▲ | Meneth 5 hours ago | |||||||||||||||||||||||||||||||
This happens because there's no auditing of new packages or versions. The distro's maintainer and the developer is the same person. The general solution is to do what Debian does. Keep a stable distro where new packages aren't added and versions change rarely (security updates and bugfixes only, no new functionality). This is what most people use. Keep a testing/unstable distro where new packages and new versions can be added, but even then added only by the distro maintainer, NOT by the package developers. This is where the audits happen. NPM, Python, Rust, Go, Ruby all suffer from this problem, because they have centralized and open package repositories. | ||||||||||||||||||||||||||||||||
▲ | btown 3 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
I'd like to think there are ways to do this and keep things decentralized. Things like: Once a package has more than [threshold] daily downloads for an extended period of time, it requires 2FA re-auth/step-up on two separate human-controlled accounts to approve any further code updates. Or something like: for these popular packages, only a select list of automated build systems with reproducible builds can push directly to NPM, which would mean that any malware injector would need to first compromise the source code repository. Which, to be fair, wouldn't necessarily have stopped this worm from propagating entirely, but would have slowed its progress considerably. This isn't a "sacrifice all of NPM's DX and decentralization" question. This is "a marginally more manual DX only when you're at a scale where you should be release-managing anyways." | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | LtWorf a few seconds ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
> The general solution is to do what Debian does. If you ask these people, distributions are terrible and need to die. Python even removed PGP signatures from Pypi because now attestation happens by microsoft signing your build on the github CI and uploading it directly to pypi with a never expiring token. And that's secure, as opposed to the developer uploading locally from their machine. In theory it's secure because you see what's going in there on git, but in practice github actions are completely insecure so malware has been uploaded this way already. | ||||||||||||||||||||||||||||||||
▲ | weinzierl 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
In Rust we have cargo vet, where we share these audits and use them in an automated fashion. Companies like Google and Mozilla contribute their audits. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | f33d5173 an hour ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
You can use debian's version of your npm packages if you'd like. The issues you're likely to run into are: some libraries won't be packaged period by debian; those that are might be on unacceptably old versions. You can work around these issues by vendoring dependencies that aren't in your distro's repo, ie copying a particular version into your own source control, manually keeping up with security updates. This is, to my knowledge, what large tech companies do. Other companies that don't are either taking a known risk with regards to vulnerabilities, or are ignorant. Ignorance is very common in this industry. | ||||||||||||||||||||||||||||||||
▲ | Yasuraka 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
> NPM, Python, Rust, Go, Ruby all suffer from this problem, because they have centralized and open package repositories Can you point me to Go's centralized package repository? | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | rlpb 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
There is another related growing problem in my recent observation. As a Debian Developer, when I try to audit upstream changes before pulling them in to Debian, I find a huge amount of noise from tooling, mostly pointless. This makes it very difficult to validate the actual changes being made. For example, an upstream bumps a version of a lint tool and/or changes style across the board. Often these are labelled "chore". While I agree it's nice to have consistent style, in some projects it seems to be the majority of the changes between releases. Due to the difficulty in auditing this, I consider this part of the software supply chain problem and something to be discouraged. Unless there's actually reason to change code (eg. some genuine refactoring a human thinks is actually needed, a bug fix or new feature, a tool exposed a real bug, or at least some identifiable issue that might turn into a bug), it should be left alone. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | silverwind 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
So, who is going to audit the thousands of new packages/versions that are published to npm every day? It only works for Debian because they hand-pick popular software. | ||||||||||||||||||||||||||||||||
▲ | rixed 4 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Exactly, in a way Debian (or any other distro) is an extended standard library. | ||||||||||||||||||||||||||||||||
▲ | stinos 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
security updates and bugfixes only Just wondering: while this is less of an attack surface, it's still a surface? | ||||||||||||||||||||||||||||||||
▲ | SkiFire13 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
> Keep a stable distro where new packages aren't added and versions change rarely (security updates and bugfixes only, no new functionality). This is what most people use. Unfortunately most people don't want old software that doesn't support newer hardware so most people don't end up using Debian stable. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | paulddraper 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Go’s package repository is just GitHub. At the end of the day, it’s all a URL. You’re asking for a blessed set of URLs. You’d have to convince someone to spend time maintaining that. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | hombre_fatal 3 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
The problem with your idea is that you need to find the person who wants to do all this auditing of every version of Node/Python/Ruby libraries. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | Aeolun 5 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
> suffer from this problem Benefit from this feature. |