Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I understand the author’s concern here, but I want to point out a couple of things (both specific to PyPI and more general):

* Package indices have always had opinions about their users’ contributions. Most indices have revocation/yanking policies that are applied to cases of namesquatting, obviously malicious packages (even if the author claims that it’s intended to be a demo), and so forth.

* PyPI has worked exceptionally hard (in my opinion) to minimize the potential disruption here: maintainers are being given free physical security keys, and those who can’t receive them will still be able to use TOTP. The rollout here has also not been enabled, and will not be for some time (to give maintainers plenty of time to enable 2FA on their own schedules); this is merely the announcement for the plan.

* Enabling 2FA on PyPI controls access to PyPI’s web interface, not publishing workflows. In other words: if you’re a maintainer of a critical project, enabling 2FA will not “gate” the releases you publish via CI. All of that will continue to work as it has before.



> Enabling 2FA on PyPI controls access to PyPI’s web interface, not publishing workflows.

Kinda feel like it should. (I also own packages that are critical.)


For publishing workflows, you should be using an API token (which only allows access to the upload endpoint and nothing else; critically, you can’t modify your account via an API token). This is consistent with how most other services handle both user and machine interaction, and (IMO) strikes the right balance between security and practicality.


And I hear this is improving to allow short-lived publication tokens and federation to prevent them from being leaked :)


Indeed! Thanks for bringing that up; there’s a ton of really great work coming in the near future.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: