PEP 740 • SIGSTORE • SUPPLY CHAIN +60 PTS NO PYPKGSCORE

OIDC Trusted Publishing on PyPI: Passwordless Security & Cryptographic Provenance

Trusted Publishing replaces static API tokens (PYPI_API_TOKEN) with ephemeral OpenID Connect (OIDC) identities issued directly by GitHub Actions, GitLab CI, or Google Cloud. This prevents supply chain attacks from leaked credentials and generates verifiable cryptographic attestations on PyPI.

⚡ Check if my package has OIDC → View GitHub Actions Template
ECOSYSTEM TELEMETRY

Trusted Publishing Adoption in PyPkgScore Catalog

Real-time audited data via PyPI Integrity API
Audited Packages
2016
Verified OIDC
952
Adoption Rate
47.2%
Supply chain security progress (OIDC Provenance) 952 / 2016 (47.2%)
01 • ZERO SECRETS

No More Leaked Tokens

You no longer need to store long-lived tokens in repository Secrets. Authentication lasts only a few seconds during the release job.

02 • PEP 740 PROVENANCE

Sigstore Attestation on PyPI

PyPI cryptographically binds each .whl and .tar.gz file to the exact commit and GitHub workflow that built it.

03 • HIGHER TRUST & SCORE

Verified Badge on PyPI & +60 pts

Enterprise teams require provenance before approving dependencies. On PyPkgScore, OIDC attestation awards full points on the supply chain check.

How to enable in 3 steps (under 3 minutes)

Step 1 — Configure the Publisher on PyPI: Go to pypi.org → Your projects → Publishing (or Pending Publishers for new packages) and enter Owner, Repository Name, workflow filename (publish.yml), and environment (pypi).
Step 2 — Create the GitHub Actions workflow: Add the .github/workflows/publish.yml file below with the id-token: write permission.
.github/workflows/publish.yml
name: Publish Package to PyPI (OIDC Trusted Publishing)

on:
  release:
    types: [published]

permissions:
  contents: read

jobs:
  pypi-publish:
    name: Upload release to PyPI via OIDC
    runs-on: ubuntu-latest
    environment:
      name: pypi
      url: https://pypi.org
    permissions:
      id-token: write
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Build wheel and sdist
        run: |
          python -m pip install --upgrade build
          python -m build
      - name: Publish package to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
Step 3 — Publish a Release and check your score: Once the release is live on PyPI, audit or re-audit your package to validate the OIDC badge.
Check my Score now →
📣 Share this page: Share PyPkgScore in the current language