Most active commenters
  • Yasuraka(6)
  • ForHackernews(6)
  • LtWorf(4)
  • ncruces(4)
  • rectang(4)
  • zwnow(3)
  • kelnos(3)
  • zelphirkalt(3)
  • Ygg2(3)
  • pabs3(3)

←back to thread

1208 points jamesberthoty | 127 comments | | HN request time: 1.426s | source | bottom
1. Meneth ◴[] No.45261303[source]
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.

replies(25): >>45261528 #>>45261617 #>>45261792 #>>45262591 #>>45262655 #>>45262978 #>>45263089 #>>45263137 #>>45263570 #>>45263728 #>>45264113 #>>45264189 #>>45265297 #>>45266032 #>>45266873 #>>45267343 #>>45268626 #>>45268669 #>>45269007 #>>45269777 #>>45270131 #>>45270753 #>>45272097 #>>45273282 #>>45273471 #
2. Aeolun ◴[] No.45261528[source]
> suffer from this problem

Benefit from this feature.

3. weinzierl ◴[] No.45261617[source]
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.
replies(4): >>45261917 #>>45265570 #>>45270798 #>>45272382 #
4. rixed ◴[] No.45261792[source]
Exactly, in a way Debian (or any other distro) is an extended standard library.
5. quotemstr ◴[] No.45261917[source]
And it's a great idea, similar thematically to certificate transparency
6. SkiFire13 ◴[] No.45262591[source]
> 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.

replies(5): >>45263830 #>>45263936 #>>45264687 #>>45267821 #>>45269435 #
7. paulddraper ◴[] No.45262655[source]
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.

replies(2): >>45263059 #>>45264917 #
8. hombre_fatal ◴[] No.45262978[source]
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.
replies(1): >>45263601 #
9. mdaniel ◴[] No.45263059[source]
As hair splitting, that's actually not true: Go's package manager is just version control of which GitHub is currently the most popular hosting. And it also allows redirecting to your own version control via `go mod edit -replace` which leaves the sourcecode reference to GitHub intact, but will install it from wherever you like
replies(1): >>45264712 #
10. btown ◴[] No.45263089[source]
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."

replies(2): >>45263691 #>>45265306 #
11. stinos ◴[] No.45263137[source]
security updates and bugfixes only

Just wondering: while this is less of an attack surface, it's still a surface?

12. Yasuraka ◴[] No.45263570[source]
> 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?

replies(2): >>45265287 #>>45267032 #
13. carlhjerpe ◴[] No.45263601[source]
I believe good centralized infrastructure for this would be a good start. It could be "gamified" and reviewers could earn reputation for reviewing packages, common packages would be reviewed all the time.

Kinda like Stackoverflow for reviews, with optional identification and such.

And honestly an LLM can strap a "probably good" badge on things with cheap batch inference.

replies(1): >>45270807 #
14. noodlesUK ◴[] No.45263691[source]
I think that we should impose webauthn 2fa on all npm accounts as the only acceptable auth method if you have e.g., more than 1 million total downloads.

Someone could pony up the cash to send out a few thousand yubikeys for this and we'd all be a lot safer.

replies(5): >>45264100 #>>45265273 #>>45265343 #>>45266948 #>>45267592 #
15. rlpb ◴[] No.45263728[source]
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.

replies(2): >>45265038 #>>45266945 #
16. bpt3 ◴[] No.45263830[source]
What hardware isn't supported by Debian stable that is supported by unstable?

Or is this just a "don't use Linux" gripe?

replies(1): >>45268074 #
17. lenerdenator ◴[] No.45263936[source]
It'd be interesting to see how much of the world runs on Debian containers, where most of the whole "it doesn't support my insert consumer hardware here" argument is completely moot.
18. thewebguyd ◴[] No.45264100{3}[source]
Why even put a package download count on it? Just require it for everything submitted to NPM. It's not hard.
replies(1): >>45264470 #
19. silverwind ◴[] No.45264113[source]
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.
replies(3): >>45265494 #>>45266572 #>>45268310 #
20. f33d5173 ◴[] No.45264189[source]
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.
21. ronsor ◴[] No.45264470{4}[source]
Because then it's extra hassle and expense for new developers to publish a package, and we're trying to keep things decentralized.
replies(5): >>45265686 #>>45266277 #>>45266585 #>>45266931 #>>45267621 #
22. veber-alex ◴[] No.45264687[source]
I don't know why you went with hardware.

Most people don't want old software because they don't want old software.

They want latest features, fixes and performance improvements.

23. thunky ◴[] No.45264712{3}[source]
How does that relate to the bigger conversation here? Are you suggesting people stop pulling Go packages from GitHub and only use local dependencies?
replies(1): >>45271553 #
24. Maskawanian ◴[] No.45264917[source]
Golang at least gives you the option to easily vendor-ize packages to your local repository. Given what has happened here, maybe we should start doing this more!
replies(2): >>45266234 #>>45267055 #
25. kirici ◴[] No.45265038[source]
I'm using difftastic, it cuts down a whole lot of the noise

https://difftastic.wilfred.me.uk/

replies(1): >>45265749 #
26. ForHackernews ◴[] No.45265273{3}[source]
PyPI already has this. It was a little bit annoying when they imposed stricter security on maintainers, but I can see the need.
27. ForHackernews ◴[] No.45265287[source]
https://github.com/
replies(1): >>45267125 #
28. LtWorf ◴[] No.45265297[source]
> 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.

29. LtWorf ◴[] No.45265306[source]
> two separate human-controlled accounts to approve any further code updates.

Except most projects have 1 developer… Plus, if I develop some project for free I don't want to be wasting time and work for free for large rich companies. They can pay up for code reviews and similar things instead of adding burden to developers!

30. LtWorf ◴[] No.45265343{3}[source]
Pypi did that, i got 2 google keys for free. But I used them literally once, to create a token that never expires and that is what I actually use to upload on pypi.

(I did a talk at minidebconf last year in toulouse about this).

If implemented like this, it's completely useless, since there is actually no 2fa at all.

Anyway the idea of making libre software developers work more is a bad idea. We do it for fun. If we have to do corporate stuff we want a corporate salary to go with.

31. jonhohle ◴[] No.45265494[source]
Maybe NPM should hand pick popular packages and we should get away from this idea of every platform should always let everyone publish. Curation is expensive, but it may be worthwhile for mature platforms.
32. gedy ◴[] No.45265570[source]
It's too bad MS doesn't own npm, and/or GitHub repositories. Wait
replies(1): >>45267047 #
33. thewebguyd ◴[] No.45265686{5}[source]
It's already centralized by virtue of using and relying on NPM as the registry.

If we want decentralized package management for node/javascript, you need to dump NPM - why not something like Go's system which is actually decentralized? There is no package repository/registry, it's all location based imports.

34. rlpb ◴[] No.45265749{3}[source]
This looks good! Unfortunately it looks like it also suffers from exactly the same software supply chain problem that we need to avoid in the first place: https://github.com/Wilfred/difftastic/blob/master/Cargo.lock

Edit: also, consider how much of https://github.com/Wilfred/difftastic/commits/master/ is just noise in itself. 15k commits for a project that appears to only be about four years old.

replies(1): >>45267376 #
35. ncruces ◴[] No.45266032[source]
This is a culture issue with developers who find it OK to have hundreds of (transitive) dependencies, and then follow processes that, for all intents and purposes, blindly auto update them, thereby giving hundreds of third-parties access to their build (or worse) execution environments.

Adding friction to the sharing of code doesn't absolve developers from their decision to blindly trust a ridiculous amount of third-parties.

replies(7): >>45266877 #>>45266951 #>>45267014 #>>45267066 #>>45267203 #>>45267940 #>>45267944 #
36. paulddraper ◴[] No.45266234{3}[source]
npm has always downloaded to the current directory.
37. LPisGood ◴[] No.45266277{5}[source]
I don’t understand what benefits this kind of “decentralization” offers
replies(1): >>45267064 #
38. whizzter ◴[] No.45266572[source]
This is maybe where we could start getting into money into the opensource ecosystems.

One idea I've had is that publishing is open as today, but security firms could offer audit signatures.

So a company might pay security firms and only accept updates to packages that have been audited by by 1,2,3 or more of their paid services.

Thus money would be paid in the open to have eyes on changes for popular packages and avoid the problem of that weird lone maintainer in northern Finland being attacked by the Chinese state.

39. ◴[] No.45266585{5}[source]
40. neutrinobro ◴[] No.45266873[source]
The lack of an easy method to automatically pull in and manage dependencies in C/C++ is starting to look a lot more like a feature than a bug now.
replies(2): >>45267126 #>>45267809 #
41. zwnow ◴[] No.45266877[source]
Unfortunately that's almost the whole industry. Every software project I've seen has an uncountable amount of dependencies. No matter if npm, cargo, go packages, whatever you name.
replies(2): >>45267089 #>>45267512 #
42. kelnos ◴[] No.45266931{5}[source]
Decentralized? This is a centralized package registry. There is nothing decentralized about it.
replies(1): >>45268419 #
43. BrenBarn ◴[] No.45266945[source]
I agree with this and it's something I've encountered when just trying to understand a codebase or track down a bug. There's a bit of the tail wagging the dog as an increasing proportion of commits are "meta-code" that is just tweaking config, formatting, etc. to align with external tools (like linters).

> 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.

The corollary to this is "Unless there's actually a need for new features that a new version provides, your existing dependency should be left alone". In other words things should not be automatically updated. This is unfortunately the crazy path we've gone down, where when Package X decides to upgrade, everyone believes that "the right thing to do" is for all its dependencies to also update to use that and so on down the line. As this snowballs it becomes difficult for any individual projects to hold the line and try to maintain a slow-moving, stable version of anything.

44. kelnos ◴[] No.45266948{3}[source]
How would that work for CI release flows? I have my Rust crates, for example, set up to auto-publish whenever I push a tag to its repo.
45. Pet_Ant ◴[] No.45266951[source]
I find that the issue is much more often not updating dependencies often enough with known security holes, than updating too often and getting hit with a supply-chain malware attack.
replies(2): >>45267211 #>>45267342 #
46. computerex ◴[] No.45267014[source]
Be that as it may, a system that can fail catastrophically will. Security shouldn't be left to choice.
47. matthew16550 ◴[] No.45267032[source]
https://pkg.go.dev/

Which works together with

https://proxy.golang.org/

replies(1): >>45267110 #
48. LikesPwsh ◴[] No.45267047{3}[source]
Nuget, Powershell gallery, the marketplaces for VSCode/VS/AZDo and the Microsoft Store too. Probably another twenty.

They collect package managers like funko pops.

I'm not quite sure about the goal. Maybe some more C# dev kit style rug-pulls where the ecosystem is nominally open-source but MS own the development and distribution so nobody would bother to compete.

replies(1): >>45267955 #
49. kelnos ◴[] No.45267055{3}[source]
This doesn't really help you. I assume Go records the sha1 hash of the commit it grabs, so it doesn't really matter if you vendor it, or download it every time.

The problem comes when you want to upgrade your dependencies. How do you know that they are trustworthy on first use?

replies(1): >>45267273 #
50. q3k ◴[] No.45267064{6}[source]
Larger pool of people you can hack/blackmail/coerce into giving you access to millions of systems :)
51. rectang ◴[] No.45267066[source]
It's not unreasonable to trust large numbers of trustworthy dependency authors. What we lack are the institutions to establish trust reliably.

If packages had to be cryptographically signed by multiple verified authors from a per-organization whitelist in order to enter distribution, that would cut down on the SPOF issue where compromising a single dev is enough to publish multiple malware-infested packages.

replies(3): >>45267357 #>>45268097 #>>45270906 #
52. AnonymousPlanet ◴[] No.45267089{3}[source]
Every place I ever worked at made sure to curate the dependencies for their main projects. Heck, in some cases that was even necessary for certifications. Web dev might be a wild west, but as soon as your software is installed on prem by hundreds or thousands of paying customers the stakes change.
replies(1): >>45267178 #
53. Yasuraka ◴[] No.45267110{3}[source]
That's a doc site and a pull-through cache, neither is a package repository
54. Yasuraka ◴[] No.45267125{3}[source]
git isn't centralized nor a package repository

For what it's worth, our code is on GitLab

replies(1): >>45268157 #
55. edtech_dev ◴[] No.45267126[source]
Author of Odin is also against adding a package manager: https://www.gingerbill.org/article/2025/09/08/package-manage...
56. zwnow ◴[] No.45267178{4}[source]
Curating dependencies won't prevent all supply chain attacks though
57. the8472 ◴[] No.45267203[source]
Rather than adding friction there is something else that could benefit from having as little friction as sharing code: publishing audits/reviews.
58. sgc ◴[] No.45267211{3}[source]
There have been several recent supply chain attacks that show attackers are taking advantage of this (previously sensible) mentality. So it is time to pivot and come up with better solutions before it spirals out of control.
replies(1): >>45269252 #
59. cyberax ◴[] No.45267273{4}[source]
Go uses the hash of the source code, not the commit ID. So there's no difference between vendoring and using the central repo.
60. dboreham ◴[] No.45267342{3}[source]
Not updating is the other side of the same problem: library owners feel it is ok to make frequent backwards-compatibility breaking changes, often ignoring semver conventions. So consumers of their libraries are left with the choice to pin old insecure versions or spend time rewriting their code (and often transitive dependency code too) to keep up.

This is what happens when nobody pays for anything and nobody feels they have a duty to do good work for free.

replies(1): >>45267611 #
61. cycomanic ◴[] No.45267343[source]
I've been arguing a couple of times that the 2 main reasons people want package management in languages are

1. Using an operating system with no package management 2. Poor developer discipline, i.e. developers always trying to use the latest version of a package.

So now we have lots of poorly implemented language package managers, docker containers on top being used as another package management layer (even though that's not their primary purpose but many people use the like that) and the security implications of pulling in lots of random dependencies without any audit.

Developing towards a stable base like Debian would not be a pancea, but alliviate the problems by at least placing another audit layer in between.

replies(2): >>45267440 #>>45268911 #
62. dboreham ◴[] No.45267357{3}[source]
Problem is that beyond some threshold number of authors, the probability they're all trustworthy falls to zero.
replies(1): >>45267458 #
63. weinzierl ◴[] No.45267376{4}[source]
"exactly the same software supply chain problem"

While the crates ecosystem is certainly not immune to supply chain attacks this over generalization is not justified.

There are several features that make crates.io more robust than npm. One of them is that vulnerable versions can be yanked without human intervention. Desperate comments from maintainers like this one[1] from just a few days ago would not happen with crates.io.

There are also features not provided by crates.io that make the situation better. For example you could very easily clone the repo and run

    cargo vet
to check how many of the packages had human audits. I'd done it if I was on a computer, but a quick glance at the Cargo.lock file makes me confident that you'd get a significant number.

[1] https://news.ycombinator.com/item?id=45170687

replies(2): >>45270940 #>>45272062 #
64. IshKebab ◴[] No.45267440[source]
Nope. It's because:

1. You don't want to tie your software to the OS. Most people want their software to be cross-platform. Much better to have a language-specific package manager because I'm using the same language on every OS. And when I say "OS" here, I really mean OS or Linux distro, because Linux doesn't have one package manager.

2. OS package managers (where they even exist), have too high a bar of entry. Not only do you have to make a load of different packages for different OSes and distros, but you have to convince all of them to accept them. Waaay too much work for all but the largest projects.

You're probably going to say "Good! It would solve this problem!", but I don't think the solution to package security is to just make it so annoying nobody bothers. We can do better than that.

replies(1): >>45270139 #
65. rectang ◴[] No.45267458{4}[source]
It's true that smuggling multiple identities into the whitelist is one attack vector, and one reason why I said "cut down" rather than "eliminate". But that's not easy to do for most organizations.

For what it's worth, back when I was active at the ASF we used to vote on releases — you needed at least 3 positive votes from a whitelist of approved voters to publish a release outside the org and there was a cultural expectation of review. (Dunno if things have changed.) It would have been very difficult to duplicate this NPM attack against the upstream ASF release distribution system.

66. jen20 ◴[] No.45267512{3}[source]
Zero-external-dependency Go apps are far more feasible than Rust or Node, simply because of the size and quality of the standard library.
replies(1): >>45267969 #
67. btown ◴[] No.45267592{3}[source]
Even the simplest "any maintainer can click a push notification on their phone to verify that they want to push an update to $package" would have stopped this worm in its tracks!
68. banku_brougham ◴[] No.45267611{4}[source]
>This is what happens when nobody pays for anything and nobody feels they have a duty to do good work for free.

Weirdly, some of the worst CVE I can think of were with enterprize software.

replies(1): >>45267964 #
69. LtWorf ◴[] No.45267621{5}[source]
Download counters are completely useless. I could download your package 2 million times in under a minute and cause you to need the 2FA.

And true 2FA means you can't automate publishing from github's CI. Python is going the other direction. There is a fake 2FA that is just used to generate tokens and there is a preferential channel to upload to pypi via github's CI.

But in my opinion none of this helps with security. But it does help to de-anonymise the developers, which is probably what they really want to do, without caring if those developers get hacked and someone else uses their identity to do uploads.

70. morning-coffee ◴[] No.45267809[source]
But there's so much UB in C++ that can be exploited that I doubt attackers lament the lack of a module system to target. ;)
71. nzeid ◴[] No.45267821[source]
Enable the Backport sources. The recent kernels there have supported all my modern personal devices.
72. zelphirkalt ◴[] No.45267940[source]
See auto update bots on Github. https://docs.github.com/en/code-security/dependabot/dependab... And since Github does it, it must be a good thing, right? Right???
73. worik ◴[] No.45267944[source]
> This is a culture issue with developers who find it OK to have hundreds of (transitive) dependencies, and then follow processes that, for all intents and purposes, blindly auto update them

I do not know about NPM. But in Rust this is common practice.

Very hard to avoid. The core of Rust is very thin, to get anything done typically involves dozens of crates, all pulled in at compile time from any old developer implicitly trusted.

replies(1): >>45269970 #
74. lovich ◴[] No.45267955{4}[source]
I took those acquisitions and a few others like LinkedIn and all the visual studio versions as a sign that Microsoft is trying to own the software engineer career as a domain.
75. zelphirkalt ◴[] No.45267964{5}[source]
That's because there many people don't feel like it is their duty to do good work, even though they are paid ...
replies(1): >>45273322 #
76. ncruces ◴[] No.45267969{4}[source]
Just the other day someone argued with me that it was reasonable for Limbo (the SQLite Rust rewrite) to have 3135 dependencies (of those, 1313 Rust dependencies).

https://github.com/tursodatabase/turso/network/dependencies

replies(3): >>45268596 #>>45270283 #>>45273091 #
77. BoredPositron ◴[] No.45268074{3}[source]
I haven't had much problems prior but Blackwell support was really buggy for the first two weeks.
78. WesolyKubeczek ◴[] No.45268097{3}[source]
"Find large numbers of trustworthy dependency authors in your neighborhood!"

"Large numbers of trustworthy dependency authors in your town can't wait to show you their hottest code paths! Click here for educational livecoding sessions!"

replies(1): >>45269857 #
79. ForHackernews ◴[] No.45268157{4}[source]
Github is a centralized repository where the overwhelming majority of Go libraries are hosted.
replies(1): >>45271949 #
80. dvh ◴[] No.45268310[source]
Errr, you! If you brought the dependency, it is now your job to maintain it and diff every update for backdoor.
81. jay_kyburz ◴[] No.45268419{6}[source]
oh right, good point, I wonder when somebody will just sue NPM for any damage caused. That's really the only way we'll see change I think.
82. whstl ◴[] No.45268596{5}[source]
This is incredible.

At this rate, there's a non-zero chance that one of the transitive dependencies is SQLite itself.

replies(2): >>45272993 #>>45275371 #
83. arp242 ◴[] No.45268626[source]
You're overestimating the amount of auditing these distros do for the average package; in reality there is very little.

The reason these compromised packages typically don't make it in to e.g. Debian is because this all tends to be discovered quite quickly, before the package maintainer has a chance to update it.

84. rpcope1 ◴[] No.45268669[source]
Yeah, after seeing all of the crazy stuff that has been occurring around supply chain attacks, and realizing that latest Debian stable (despite the memes) already has a lot of decent relatively up-to-date packages for Python, it's often easier to default to just building against what Debian provides.
85. cortesoft ◴[] No.45268911[source]
It doesn't matter if the operating system I personally use has a good package manager, I need to release it in a form that all the people using it can work with. There are a lot of OSes out there, with many package managers.

Even if we make every project create packages in every package manager, it still wouldn't add any auditing.

86. cortesoft ◴[] No.45269007[source]
In practice, my experience is that this ends up with only old versions of things in the stable package repos. So many times I run into a bug, and then find out that the bug has been fixed in a newer version but it isn't updated in the stable repo. So now you end up pulling an update out of band, and you are in the same boat as before.

I don't know how you avoid this problem

87. IgorPartola ◴[] No.45269252{4}[source]
A model that Linux distros follow would work to an extent: you have developed of packages and separate maintainers who test and decide to include or exclude packages and versions of packages. Imagine a JS distro which includes the top 2000 most popular libraries that are all known to work with each other. Your project can pull in any of these and every package is cryptographically signed off on by both the developers and the maintainer.

Vulnerabilities in Linux distro packages obviously happen. But a single developer cannot push code directly into for example Debian and compromise the world.

88. dmitrygr ◴[] No.45269435[source]
> Unfortunately most people don't want old software

"old" is a strange way to spell "new, unstable, and wormed".

I want old software. Very little new features are added to most things i care about, mostly it is just bloat, AI slop, and monthly subscription shakedowns being added to software today.

89. cuillevel3 ◴[] No.45269777[source]
Distros are struggling with the amount of packages they have to maintain and update regularly. That's one of the main reasons why languages built their own ecosystems in the first place. It became popular with CPAN and Maven and took off with Ruby gems.

Linux distros can't even provide all the apps users want, that's why freshmeat existed and we have linuxbrew, flatpak, Ubuntu multiverse, PPA, third party Debian repositories, the openSUSE Buildservice, the AUR, ...

There is no community that has the capacity to audit and support multiple branches of libraries.

90. rectang ◴[] No.45269857{4}[source]
I don't understand your critique.

Establishing a false identity well enough to fool a FOSS author or organization is a lot of work. Even crafting a spear phishing email/text campaign doesn't compare to the effort you'd have to put in to fool a developer well enough to get offered publishing privileges.

Of course it's possible, but so are beat-them-with-a-five-dollar-wrench attacks.

91. hedora ◴[] No.45269970{3}[source]
The same is true for go and for java.
replies(1): >>45273120 #
92. orblivion ◴[] No.45270131[source]
For python I use Debian packages wherever possible. What I need is in there usually. I might even say almost always.
93. cycomanic ◴[] No.45270139{3}[source]
I actually agree in the context of user software people often want the latest and that Windows and OS don't have proper package management is an issue.

However we are talking in the context of NPM packages which by the vast majority would be running inside a container on some server. So how could that software not use a stable Debian base for example.

And arguing that package management is to complicated is a bit ridiculous considering how many workloads are running in docker containers which I'd argue are significantly more complex

94. Ygg2 ◴[] No.45270283{5}[source]
Yeah. You have dev dependencies in there, those alone will increase number of dependencies by ~500, without ending up in the final product.

Those numbers are way off their actual number.

replies(2): >>45271323 #>>45272468 #
95. pabs3 ◴[] No.45270753[source]
To be clear, Debian does not audit code like you might be suggesting they do. There are checks for licensing, source code being missing, build reproducibility, tests and other things. There is some static analysis with lintian, but not systematically at the source code level with tools like cppcheck or rust-analyzer or similar. Auditing the entirety of the code for security issues just isn't feasible for package maintainers. Malware might be noticed while looking for other issues, that isn't guaranteed though, the XZ backdoor wasn't picked up by Debian.

https://lintian.debian.org/

96. pabs3 ◴[] No.45270798[source]
I wish cargo went with crev instead, that has a much better model for distributed code audits.

https://github.com/crev-dev/

97. pabs3 ◴[] No.45270807{3}[source]
Decentralised auditing is what is needed.

https://github.com/crev-dev/

98. jitix ◴[] No.45270906{3}[source]
It IS unreasonable to trust individual humans across the globe in 100+ different jurisdictions pushing code that gets bundled into my application.

How can you guarantee a long trusted developer doesn't have a gun pointed to their head by their authoritarian govt?

In our B2B shop we recently implemented a process where developers cannot add packages from third party sources - only first party like meta, google, spring, etc are allowed. All other boilerplate must be written by developers, and on the rare occasion that a third party dependency is needed it's copied in source form, audited and re-hosted on our internal infrastructure with an internal name.

To justify it to business folks, we presented a simple math where I added the man-hours required to plug the vulnerabilities with the recurring cost of devsecops consultants and found that it's cheaper to reduce development velocity by 20-25%.

Also devsecops should never be offshored due to the scenario I presented in my second statement.

replies(2): >>45271074 #>>45274000 #
99. lukaslalinsky ◴[] No.45270940{5}[source]
I'd argue it's more of a culture thing, not technical thing.

In both JavaScript and Rust, it's normal/encouraged to just add a tiny dependency to the package manager. The communities even pride themselves, that they have such good package managers to allow this.

It's this "yeah, there is a crate for this tiny function I need, let's just include it" mentality that makes the ecosystem vulnerable.

People need to be responsible for whatever they include, either pay the price by checking all versions up front, or pay it by risking shipping a vulnerable program that it's much harder to retract than a JavaScript frontend.

100. rectang ◴[] No.45271074{4}[source]
You've presented your argument as if rebutting mine, but to my mind you've reinforced my first paragraph:

* You are trusting large numbers of trustworthy developers.

* You have established a means of validating their trustworthiness: only trust reputable "first-party" code.

I think what you're doing is a pretty good system. However, there are ways to include work by devs who lack "first-party" bona-fides, such as when they participate in group development where their contributions are consistently audited. Do you exclude packages published by the ASF because some contributions may originate from troublesome jurisdictions?

In any case, it is not necessary to solve the traitorous author problem to address the attack vector right in front of us, which is compromised authors.

101. what ◴[] No.45271323{6}[source]
500 dev dependencies doesn’t seem reasonable either…
replies(1): >>45272401 #
102. mdaniel ◴[] No.45271553{4}[source]
I wasn't trying to relate anything to the bigger conversation, I just meant to draw attention to the fact that GitHub is not golang's package manager

That said, I would guess the 'bigger conversation' is that it is much harder to tpyo <<import "github.com/DataaDog/datadog-api-client-go/v2/api/datadogV2">> than $(npm i dataadog) or similar in a "flat" package namespace (same for its $(uv pip install dataadog) friend)

None of those cited ones fix the dependency lineage issue, proving that release 1.1 was authored by the same chain of custody as release 1.0 of any given package. One can opt in to gpg verified dependencies in Maven, but it is opt-in. The .jar artifacts can also be cryptographically signed, but the risk that's trying to drive down is tamperproofing and not lineage, AFAIK

103. Yasuraka ◴[] No.45271949{5}[source]
So GitHub is every single programming language's centralized package repository?

Then what's the difference between git and npm, cargo, pypi, mvn et al?

replies(1): >>45273397 #
104. inbx0 ◴[] No.45272062{5}[source]
The main issue there is that the maintainer lost access to their account. Yanking malicious packages is better, but even just being able to release new patch versions would've stopped the spread, but they were not able to do so for the packages that didn't have a co-publisher. How would crates.io help in this situation?

FWIW npm used to allow unpublishing packages, but AFAIK that feature was removed in the wake of the left-pad incident [1]. Altho now with all the frequent attacks, it might be worth considering if ecosystem disruption via malicious removal of pacakge would be lesser of two evils, compared to actual malware being distributed.

1: https://en.wikipedia.org/wiki/Npm_left-pad_incident

105. pxc ◴[] No.45272097[source]
Right. Like NPM, Debian also supports post-install hooks for its packages. Not great (ask Michael Stapelberg)! But this is still a bit better than the NPM situation because at least the people writing the hooks aren't the people writing the applications, and there's some standards for what is considered sane to do with such hooks, and some communal auditing of those hooks' behavior.

Linux distros could still stand to improve here in a bunch of ways, and it seems that a well-designed package ecosystem truly doesn't need such hooks at the level of the package manager at all. But this kind of auditing is one of the useful functions of downstream software distros for sure.

106. oneshtein ◴[] No.45272382[source]
How to backport security fixes to vetted packages?
107. zwnow ◴[] No.45272401{7}[source]
Even 50 seems unreasonable...
108. ncruces ◴[] No.45272468{6}[source]
Right. Allowing 500 strangers to push code to our CI infra, or developer laptops, with approximately zero review, sounds similarly ill advised.

That JLR got their factories hacked, rather than customer cars, is less bad for sure. But it's still pretty bad.

Also, before arguing that code generators should get a pass as they don't “end up in the final product”, you really should read “Reflections on trusting trust” by Ken Thompson.

replies(1): >>45273212 #
109. wolvesechoes ◴[] No.45272993{6}[source]
But it will be safe SQlite, called from Rust.
110. ricardobeat ◴[] No.45273091{5}[source]
Even more wild considering that SQLite prides itself on having zero dependencies. Sounds like a doomed project.
111. ricardobeat ◴[] No.45273120{4}[source]
You can write entire applications in Go without resorting to any dependencies, the std lib is quite complete.

Most projects will have a healthy 5-20 dependencies though, with very little nested modules.

112. Ygg2 ◴[] No.45273212{7}[source]
> Right. Allowing 500 strangers to push code to our CI infra

That's bullshit, pure and simple. If you pull in a deeply nested dependency like icu_normalizer it has 30 dependencies, OMGHAXOZRS. I'm doing this, so I don't have to spend a day going through the library.

Except of the 30 depedencies crates, there are 10 from ICUX repository, and then you have almost standard dependencies like proc-macro/syn/quote crates from dtolnay, `zerofrom` from Google. `smallvec` from the Servo project, and yoke from... checks notes... from ICUX.

The only few remaining crates here are `write16`, `utf8_iter` and `utf16_iter` that are written from hsivonen, who is also a ICUX contributor.

So even for 30 dependencies, you actually depend on proc-macro/syn/quote which are foundational crates. Few crates from Google, few crates from Servo, and three crates written by another ICUX contributor.

We started with 30 dependencies and ended up with 3 strangers

replies(2): >>45273391 #>>45273569 #
113. ExoticPearTree ◴[] No.45273282[source]
> The general solution is to do what Debian does.

The problem with this approach is that frameworks tend to "expire" pretty quickly and you can't run anything for too long on Debian until the framework is obsolete. What I mean by obsolete is Debian 13 ships with Golang 1.24, A year from now it's gonna be Golang 1.26 - that is not being made available in trixie. So you have to find an alternative source for the latest golang deb. Same with PHP, Python etc. If you run them for 3 years with no updated just some security fixes here and there, you're gonna wake up in a world of hurt when the next stable release comes out and you have to do en-masse updates that will most likely require huge refactoring because syntax, library changes and so on.

And Javascript is a problem all by itself where versions come up every few months and packages are updated weekly or monthly. You can't run any "modern" app with old packages unless you accept all the bugs or you put in the work and fix them.

I am super interested in a solution for this that provides some security for packages pushed to NPM (the most problematic repository). And for distributions to have a healthy updated ecosystem of packages so you don't get stuck who knows for how long on an old version of some package.

And back to Debian, trixie ships with nginx 1.26.3-3+deb13u1. Why can't they continuously ship the latest stable version if they don't want to use the mainline one?

114. jand ◴[] No.45273322{6}[source]
Who do you mean with "many people"? Developers who do not care or middle management that oversold features and overcommitted w.r.t. deadlines? Or both? Someone else?
replies(1): >>45274069 #
115. ncruces ◴[] No.45273391{8}[source]
It's great that you did that due diligence once. It really is. If I were reviewing that merge request, and you told me that, I'd be inclined to approve.

But how do we scale that to 1000 dependencies, and every one of their updates? What tools are there to help us, and does the community at large use them?

What I really don't like, and why I wrote that it's a culture issue, is the lightness with which these decisions are often made.

My most popular library has about a dozen dependencies. The README states clearly and “above the fold” what are the core deps (3, no transitive). Every other dependency is either first party, or optional and justified with a comment in the deps file (if you don't use the optional feature, it doesn't end up in your deps file).

There's also a generated BLOB. The generation of the BLOB is reproducible in your own environment, and its provenance attestated.

Those are all risks, that I'm passing on to my users, but I do my best to mitigate them, and communicate this clearly to them.

116. ForHackernews ◴[] No.45273397{6}[source]
Git != Github.

In practice, little difference between Go's use of Github and Python's use of PyPI. Someone at Microsoft with root access could compromise everyone.

replies(1): >>45277776 #
117. aljarry ◴[] No.45273471[source]
NX NPM attack (at least the previous wave which targetted tinycolor) relied on running post-install scripts. Go tooling does not give you ways to run post-install scripts, which is much more reasonable approach.
118. Etherlord87 ◴[] No.45273569{8}[source]
Sorry, I don't know much about the subject, so this is not a rhetorical or even just loaded question:

Isn't it actually the case that you started with 3 strangers, but 27 of them were relatively easy (still took some time) to figure out as safe?

replies(1): >>45275437 #
119. user34283 ◴[] No.45274000{4}[source]
If someone is wondering how effective such an approach is going to be with npm, consider the following:

If you add jest, the popular test runner by Meta, that's adding 300 packages to your dependency graph.

And here we don't yet have a bundler, linter, code formatter, or even web framework.

So good luck with minimizing those dependencies.

120. zelphirkalt ◴[] No.45274069{7}[source]
I was thinking of many developers, but actually middle management should be included.
121. Meneth ◴[] No.45275371{6}[source]
3 different types of sqlite, 14 different versions total: https://github.com/tursodatabase/turso/network/dependencies?...
replies(1): >>45278442 #
122. Ygg2 ◴[] No.45275437{9}[source]
You have 30 items you bought from various stores. You bought ~20 from yourself, around 5 from Google, 4 from hsivonen and one from servo.

You could of course investigate individuals commits, but that's probably an overkill.

123. Yasuraka ◴[] No.45277776{7}[source]
> Git != Github

That's why I'm putting emphasis on it, because to Go it is.

And to languages that actually have centralized package repositories it isn't. There is a difference between code and packages and Go simply does not have the latter (in the traditional sense - what Go calls a package is a collection of source files in the same directory that are compiled together within a module (a module is a collection of packages (again, code) that are released, versioned, and distributed together. Modules may be downloaded directly from version control repositories or via proxy servers)).

To the other languages mentioned above, packages may have binaries, metadata and special script hooks. There is a package manager like pip , cargo or npm and if you want to install one, you won't have to specify a URL because there is a canonical domain to go to.

Go just knows code and it'll use git, hg or even svn. And if you want to claim that lots of open-source code being on GitHub makes it special, then

> GitHub is every single programming language's centralized package repository

and

> Someone at Microsoft with root access could compromise every user of every single programming language

replies(1): >>45280065 #
124. aw1621107 ◴[] No.45278442{7}[source]
Looks like they're all pulled in as dev dependencies. libsqlite3-sys gets pulled in by rusqlite, which is used by core_tester, limbo_sim, write-throughput-sqlite, and as a dev_dependency for turso_core.
125. ForHackernews ◴[] No.45280065{8}[source]
I think you're being silly to be so insistent about this. 95% of Go packages are hosted on Github, a centralized hosting platform. The fact that they install via the git protocol (or do they? do they just use https to check out?) is immaterial.

95% of Python packages are installed from PyPI, but just like Go can also install from non-Github sources, Python supports installing from other non PyPI indexes[0] or even from a Git repository directly[1] like Go.

> what Go calls a package is a collection of source files in the same directory

What is it that you imagine Python or NPM packages consist of? Hint: A Python .whl file is just a folder in a zip archive (Python also supports source distributions directly analogous to Go)

[0] https://docs.astral.sh/uv/concepts/indexes/

[1] https://thelinuxcode.com/install-git-repository-branch-using...

replies(1): >>45281363 #
126. Yasuraka ◴[] No.45281363{9}[source]
> 95% of Go packages[=code, the author] are hosted on Github

So "GitHub is every single programming language's centralized package repository, because lots of code is hosted there" ?

> Python supports installing from other non PyPI indexes > 95% of Python packages are installed from PyPI, but just like Go can also install from non-Github sources, Python supports installing from other non PyPI indexes[0] or even from a Git repository directly[1] like Go.

And yet there is a clear difference between source distributions and pip/npm/rubygem/cargo packages - and between tooling/ecosystems that ONLY support the former and those that MAY use either and unfortunately mostly use the latter.

> What is it that you imagine Python or NPM packages consist of?

Something like a script that runs as part of the package that downloads a tarball, modifies package.json, injects a local bundle.js and runs npm publish (see this post). Usually also hosted at the default, centralized, authoritative source run by the maintainers of the package management tool.

But I'm repeating myself.

> (or do they? do they just use https to check out?)

Maybe try it out or read the docs first.

I'm closing with this:

> NPM, Python, Rust, Go, Ruby all suffer from this problem, because they have centralized and open package repositories.

is either wrong or disingenuously misleading, requiring nothing to apply to every single thing, depending on how you slice your definitions. It does not hold any water, that is my entire argument.

replies(1): >>45287193 #
127. ForHackernews ◴[] No.45287193{10}[source]
k, let me know how your CI pipeline fares the next time there's a Github outage and we can revisit this discussion of Go's fantastic uniquely decentralized dependency management.