Hacker News new | ask | show | jobs
by time4tea 17 days ago
Not very keen that the whole story of trust is basically centralisation - requiring "big cloud" and essentially promoting lock-in.

Did I get that right? Seems a bit anti-pythonic.

7 comments

I just don't get why the model is absolute trust in a single publisher. They should enforce reproducible builds and set up an attestation system where you can have GitHub or Google build your code and declare that the hash matches what you said.

That way projects that want to be extra safe can set up multiple providers to check the code independently, and third parties can upload their own attestation that PyPI doesn't trust by default but you can add them to your private whitelist. And they wouldn't have to care about where the release is uploaded from.

Crypto projects know that 1 of 1 is the worst possible trust assumption. If you want real confidence you need more than one party.

Given infinite time and engineering talent, PyPI could do a lot of things. The things we actually do reflect the outer envelope of what we can do.

(Python packaging isn’t anywhere close to reproducible, and it isn’t clear how PyPI would enforce that without pissing off >90% of the ecosystem.)

Reproducible builds only solve small slice of the problem. Build attestation in general solves more, but is useless unless a credible entity is (conceptually) attesting that a package is OK.

The growth of centralized authorities arises from the reality that the vast majority of devs do not and will not independently vet or attest to the quality of libraries they use. That’s not great, but it is what we have and doesn’t look likely to change.

Given that, and given that people still want as much security as they can conveniently get, centralized control (from “we run a security scanner and trust its findings” to “packages can only be downloaded from pypi/debian stable/whatever”) is a natural result.

I think at this point the group of devs+ who are not fully on board with control by and dependence on big tech/VC is a small niche unfortunately.
I don't think this is true. From my experience, developers are the people who care about this topic the most. Just look at HN, almost everyone (who speaks out) is against.
I'm very in favor of this work, but don't generally comment because these comment threads are full of folks strawmanning the work being done, and in my experience those folks aren't really interested in productive discussion.

I'd be wary of trying to estimate the split of opinions based on who comments.

Can you explain the misconceptions? Currently what I see is a) a checkmark box that can only come from a large provider, and b) no good idea of what that checkmark box means in a practical sense, or why I should care or why pypi cared to implement it. What is the threat that this prevents? To me this seems to not particularly improve security but that it does create this pressure towards using a small subset of providers (even if that pressure is pretty light at the moment).

(I've had a quick read through the various links but they mostly seem to emphasize what it's not, which is why I say that it doesn't seem to improve security, and especially I don't really see a motivation for why these other parties need to be involved in the way they are: the only benefit I can imagine is a third-party attestation that some artifact corresponds to some source code, which seems to be partly besides the point and partly solvable through better means)

I didn't reference misconceptions, for what it's worth. I referred to strawmanning, and if you're curious for some examples:

https://news.ycombinator.com/item?id=50499144

https://news.ycombinator.com/item?id=50500622

https://news.ycombinator.com/item?id=50499218

If you're curious to dig into what the checkmark means, why you should care, and why they implemented it, I'm not going to be able to do a better job than https://docs.pypi.org/attestations/security-model/

All that page really says is "the signing does what it does", i.e. that it verifies that the package was signed by one of the 'trusted publishers'. It doesn't do anything to explain why I should care if a package came from github or whatever. Especially it doesn't explain why it should be github and not pypi or the original author that does this signing, since really what I care about is whether the author/maintainer of the package has changed, not their publishing platform, and presumably pypi already has at least the means to authenticate them.
FWIW they have at least significantly reduced the size and prominence of the checkmark. The original design had a giant green checkmark front and centre with a bunch of smaller green checkmarks all showing how super special and trustworthy the project was.
I believe you got that wrong.

Here's some extra context [0]: https://github.com/pypi/warehouse/issues/20927. Loooots of links to click in.

the point here being small service providers are _also_ able to get into this system, but I think there's an expectation of success.

The bar for trusted publishers is very high though. I don't think it's high "on purpose" to leave out certain platforms for being too small, but in effect if (for example) your provider doesn't have a security contact point then that's going to rule them out here.

I’d like to see support for trusted publisher signing and manual upload. Think of it as two step auth for artifact publishing. Pipeline generated artifacts and human upload of those verifiable artifacts. The current reality of trusted publishing, is devoid of trust, except it was triggered by a pipeline that pypi trusted. That pypi is now able to call out such trust is great btw, but as a project that currently does this two step generation, it feels like we are penalized for trying to introduce additional steps out of abundance of caution… separately, what mechanism does a client installer have to verify a pkg install was cryptographically attested to wrt to production?

sans client verification of signatures by default, install is still roulette, and I’m glad package managers have introduced package publication date based cool off options now.

Yeah that's not the worst idea, since in theory signing is about tamper prevention.

(Personally I think that we just shouldn't have automated releases via CI, full stop. There should "always" be a person pressing a button to release things. So I'm in a bit of a big tent with manual upload support. At least some second factor for releases!)

I think generally though the idea is that trusted publisher signing + upload is about simplifying .... something. But given how attacks have been happening in the past 24 months I fear that this might not help as much as we want.

> Seems a bit anti-pythonic

Quite the opposite. "There should be one-- and preferably only one --obvious way to do it".

It's anti lots of things, but I don't think it's anti-Pythonic. Python is about pragmatism & empathy if it's about anything -- bitcoin and such don't factor into it. See: Astral/OpenAI, Anaconda, most of the PSF board historically being employees of big corporate users of python, NVidia's relation to the ecosystem in general, etc.

As a passionate anarchosyndicalist, I, for one, am thrilled about it. Decentralization is a tool in our toolbox for identifying and dismantling unjust hierarchies, but it is not a panacea, and can be quite damaging when taken to the extreme. See: cryptocurrency speedrunning 200y of bank regulations in 20y.

To put my trust for Python in more concrete terms: they support GitLab. As a passionate GitLab shill, I really couldn't be more impressed! It continues to shock me how infrequently the second most popular forge is acknowledged, much less supported. This shows they're not just, IDK, bowing to Microsoft's demands.

> This shows they're not just, IDK, bowing to Microsoft's demands.

Not only don't we, but I must emphasize that Microsoft did not pay for anything involving the implementation of either Trusted Publishing or attestations on PyPI. I wrote a personal blog post explaining some of my own rationale for why we prioritized GitHub and GitLab for PyPI's initial support targets, and it shouldn't be surprising to anybody who knows me that the reasons are pragmatic, not dogmatic[1].

[1]: https://blog.yossarian.net/2024/11/18/Security-means-securin...

Is "a public key that I personally upload to my PyPI account, using the credentials you already have that allow me to use that account" on the list of targets that will ever be supported?

If not--i.e., if only recognized "forges" are ever going to be supported--why not?

Thanks, I'll comment further in that subthread.
All absolutely reasonable. At the same time though there are a lot of roads leading to centralisation, and as they all converge it gets just a bit .. problematic.

Absolutely not claiming its not a pragmatic step, but equal-footing alternatives would be useful.

I'm no tin-foil-hat - but when a website account requires government id (like in the uk), and creating software requires signing by the website, you link all the things - is that a good outcome?

This is true, and it’s why I’m hopeful that some of the newer forges can make meaningful default posture improvements that make migration away from centralized services the dispassionate choice to a user who cares about availability and security.
Yeah but aren't we talking about PyPI, here? I love some illegal software (shoutout to Anna) but it seems like leaning on various cyber-sensitive registries to make it more available is a very small reward in exchange for a huge, tangible risk.

AnnasArchive in particular is a decent example to keep in mind, since she seems to host her own GitLab instance for opensource development. Obviously that doesn't solve this exact problem b/c self-hosted instances don't work as trusted publishers, but it speaks to what I've clumisly been trying to, here: when it comes to protecting software & speech that the government is trying to ban, making sure those people can host their own stuff and still access the minimum shared infrastructure to allow people to find and use/read it is a lot more practical than trying to build the 99%'s platforms around criminality.

Cause that's what we're talking about, here, to be clear. Criminality. Again I love some criminals and even some crimes, but the word's typical connotations seem like a pretty good reminder of what prioritizing such usecases in the mainstream can cost us.

Thanks for the link - your blog is great! eg https://blog.yossarian.net/2026/04/11/Brocards-for-vulnerabi...
For example MSFT (not a small player i know) is having its slightly different approach to those signals and they cannot be used here (search scitt). I mean different type signature envelopes, different roots of trust. But in the spirit it is the same. This approach is partially a territorial grab by google (first npm, then pypi, next golang). But importantly I think these security improvements are marginal and you are at the mercy of the dependency developer anyway. Just look at npm, they had some nasty vectors and similar “improvements” were close to useless in those cases.
You got that right. In this thread we have a ClosedAI employee promoting ClosedID services. Look at the sponsors of ClosedID:

https://openid.net/foundation/sponsoring-members/

We know why PyPI ripped out PGP support and has refused any verification mechanisms that other distributions use for decades.

I trust myself way more to with with a pgp key on my computer than figuring out how to use GitHub actions properly...
The problem is no one else does. Github workflow is at least public and auditable. Your personal computer is not.
So what? Ultimately the trust model is supposed to be there to validate that this latest blob of code is coming from the same source as the last blob of code for the same project, authenticated with the same public key. And that's all it is telling you, and all that it can tell you, whether the attestation is generated during a Github workflow or by a program running on my personal computer that you can't see. It is not telling you that this latest blob of code is safe and free from problems. It's just telling you that it comes from the same source.
The average person using GPG isn’t actually providing me much evidence in that regard, given the number of ways to have technically used a GPG key to sign an artifact that aren’t secure.
That's easy to handle: if the signature isn't secure, it doesn't count as an attestation. I have no problem with putting the onus on the person doing the signing to do it right. But at present doing it right on your own is not even an option. Only going through one of the tech giants is.
Every private key not created inside a HSM should be assumed to be compromised.
Github workflow public and audible?

The repos workflow source, yes.

But the workflow engine implementation? I don't know how much of it is open source, but I am sure nobody external can audit what Microsoft really runs there. Another company starting with M has just been fined for accessing users' photos. So I would not be 100% surprised if Microsoft changed/amended some user code before executing it or interpreted it in an unpublished way e. g. "for security reasons"

1. "ClosedAI" is not gonna win people over to your side, IMHO. Apple doesn't plant trees, Microsoft makes big hardware, and Python is not satanic.

2. I'm not entirely sure what the link is supposed to prove -- would appreciate a word of clarification if you find the time. It almost feels like a dogwhistle of some kind, but A) I doubt anyone on HN is anywhere near that problematic, and B) there's no clear pattern in those companies other than "interested in ID tech", and none of the usual dogwhistle targets made the list. Also, y'know, OpenAI isn't on it...?

I guess my fundamental confusion isn't about the list and more about what "we know". Are you implying that they are against pure, unmanaged PGP for this system because... I mean, why? Because they're playing the long game to promote a verification/attestation/identification (?) technology that you think offers less stringent privacy guarantees, and thus to sell more ads in 2036?

If so, doesn't that seem like a kinda roundabout way to raise Display Ads revenue, otherwise known as "that one dying industry"?