Trusted Publishing

term

securityprogramming

Kept in this browser · My desk

PyPI's way of uploading releases from CI without a stored API token: the CI job proves its identity with an OpenID Connect token, and PyPI issues a short-lived upload token to the project that trusts that identity.

The token PyPI mints is valid for 15 minutes. PyPI documents four providers: GitHub Actions, Google Cloud, ActiveState and GitLab CI/CD (continuous integration and continuous delivery). Its security model says to treat a trusted publisher as if it were an API token: protect the workflow, avoid pull_request_target triggers, use a dedicated environment with reviewers. Files published this way can carry PEP 740 attestations naming the repository and workflow; pip itself has been released like this since pip 25.0.

Also known as: trusted publisher, PyPI trusted publishing, OIDC publishing

← Back to T Back to the glossary