Post by @jaseg@chaos.social
I'm honestly not a fan at all of PyPI's introduction of a "file provenance" feature under a page labelled "security", branding projects that don't use github, google, or gitlab as insecure.
14 likes
The way PyPI nudges users to view packages not built at e.g. github or google but on your on infrastructure as "insecure" IMHO runs counter to where we should be going as an open-source ecosystem. Discriminating against e.g. self-hosted #forgejo or platforms like #codeberg in favor of github and google is a bad look in 2026.
@jaseg is there not an option to add signing keys for custom infrastructure? I'm not in principle opposed to mandatory release signing as long as i can e.g. sign releases built on my local cluster.
In fact if I'm using local infrastructure, an alleged release signed by GitHub keys should be considered untrusted
@azonenberg @jaseg No, only those three providers are allowed to sign releases and there are no custom keys
@azonenberg AFAICT the only choices are github, gitlab, google and activestate with no option to add your own as a project admin.
@azonenberg It's also a kinda stupid design since IIRC a lot of the supply chain compromises in the past compromised the CI pipeline, and didn't just sideload a malicious package version past it so the package origin is at best orthogonal to any measure of "security" despite what they claim in their UI.
@jaseg@chaos.social Can you please tell me what you're seeing that makes you think that? My impression is that it's the inverse.
Packages built using the Trusted Publishing Pipeline are marked as secure. Others aren't. Think about the trade-offs inherent in creating infrastructure like this.
When I look at a package we build with our Concourse pipeline at MIT, this is what I see:
It says "No provenance found". How is that "insecure" ? Or are you looking at something else?
@feoh if you know what you’re looking for that looks harmless. However, if you’re not well-versed in this stuff you see one project page with lots of important-looking stats and a checkmark on the security page, and one with a scary disclaimer and a callout saying “no provenance found”, and you choose the first, github-hosted project over the second. It’s a nudge. It’s not an in your face warning, but a subtle signal.
@feoh The subtleness is what makes this insidious. If you’d measure this at scale, I’m sure you’re going to see this nudge working, especially once LLMs are involved in making decisions on the potential package user’s side.
@feoh Contrast this design with one where you can simply turn off the “security” tab for your project, or one where you can just set your own signing keys at the project level. There is no reason that wouldn’t work technically, it’s a pure policy decision and a question of priorities.
@jaseg@chaos.social Honestly I respectfully disagree. It is exactly what it says on the tin. If you think they should use different language that would more clearly communicate the facts, you should engage with the @ThePSF@fosstodon.org security team. They're amazing folks doing seriously great work.
@feoh That’s alright, then we disagree here. My stance is that most users don’t read this stuff, and the mere presence or absence leads to people making (uninformed, incorrect) inferences. It’s not great, but that’s how people are. They don’t read disclaimers or take the time to understand nuanced security stuff.
I’ve brought it up over at github, but to a chilly response. That’s really all I’m going to do here, I don’t have the time or energy to argue this to the end.
@feoh contextualize all of this with the fact that this entire feature is near useless to do anything against real attacks, and that the little it does doesn’t require the “security” tab UI in the first place.
@f4grx @feoh yeah, that’s why this reads like corporate capture to me. It’s a superficially harmless feature that’s functionally mostly useless yet introduces a small nudge on both maintainer and user ends towards using github (or another large platform). This sort of constellation can end badly despite the best intentions of everyone involved.
I think it’s important to acknowledge that there would have been a dozen other ways to implement this that wouldn’t have these problems.
@jaseg@chaos.social @f4grx First, and perhaps most importanty, respect to you for cogently and sanely expressing your opinions. So many people basically pillory the folks involved in Python infra and that's just not fair. They're volunteers trying their best.
Second, I'm not sure I agree that it's useless. I don't know if you were around a couple years back. Pypi was being hit with malware. Some of it deadly serious (credential stealers and the like) and some of it was hijacking people's accounts and overwriting existing packages with those containing malware payloads.
The two folks the PSF hired to try to improve the state of Python's infra security came up with this plan and undertook a massive amount of community feedback and review. In the end this was deemed the least worst solution that would have the most impact.
Since this was put in place, packages built with trusted publishing pipelines haven't been victimized in that same way.
That said, I understand that the mechanism requires Github and Github is owned by MSFT. Corporate capture is real and a problem, but the solutions to that are unbelievably hard. The amount of money required just to run pypi is huge.
Expressing opinions like this is a good first step. Coming up with better solutions in a way that can be implemented might be a good next step.
If you do that, say in a blog post or even a detailed post here, let me know and if I think it makes sense I'll champion it, take it to #pyconus with me next year and socialize it.