Cyber Risks · Trail of Bits Blog

Trusted publishing: a new benchmark for packaging security

Summary: Trail of Bits worked with the Python Package Index over the past year to add trusted publishing, an authentication method built on OpenID Connect that removes long-lived API tokens and passwords from release workflows. The design binds a PyPI project to a specific OIDC identity - such as a GitHub Actions workflow in a named repository - and adds a claim tied to the user's stable ID so that an attacker who takes over a released username cannot publish.

What's compelling: A long-lived token stored in a GitHub Actions secret can be read by any step in the workflow, while trusted publishing's credentials live only a few minutes at a time - so an attacker caught mid-incident is sealed off without human intervention. The account resurrection case is the one to sit with: a project trusting hamilcar/cartago would otherwise start trusting an attacker the moment the original user renamed to hannibal.

Read the original at Trail of Bits Blog ↗

Topics
Supply Chain & AppSec
Related
Kitesurf is now open source Cyber Risks · Nov 13, 2026