How to Check Whether a PyPI Release Has a PEP 740 Attestation (November 2026)

Glasp Data Sources

Glasp Data Sources

Nov 21, 2026

5 min read

Whether a file on PyPI carries a PEP 740 attestation can be checked in two places PyPI documents: the provenance key for that file in the JSON simple index (PEP 691), and PyPI's Integrity API at GET /integrity/<project>/<version>/<filename>/provenance, which returns "404 Not Found" when the "file has no provenance." Attestations are checked per file, not per release. PyPI's attestation documentation says they can be signed only by three Trusted Publisher identities: GitHub Actions, GitLab CI/CD and Google Cloud. PyPI describes an attestation as tying a file to the identity that signed it; the pages read do not describe it as a safety review of the code.



What an attestation is

The PyPI attestation documentation says "Digital attestations enable package maintainers as well as third parties (such as the index itself, external auditors, etc.) to cryptographically sign for uploaded packages," and that the signatures bind each release distribution to a cryptographic digest of its contents. It says attestations let "both PyPI and downstream users to verify that a particular package was attested to by a particular identity." It lists GitHub Actions, GitLab CI/CD and Google Cloud as the identities that can sign, and says "ActiveState is a supported Trusted Publisher, but does not currently produce attestations."

The standard behind it is PEP 740, "Index support for digital attestations," Standards Track, status Final, created January 8, 2024, resolved July 17, 2024. The PEP marks itself as a historical document and points to PyPI's documentation and the PyPA specifications as current.

PyPI announced support in its November 14, 2024 blog post: "PyPI package maintainers can now publish signed digital attestations when publishing," with "a new API" for consumers and installers to verify them.



Where to check

  • The simple index. PEP 691, status Final, defines the JSON form of the index, requested with an Accept header for application/vnd.pypi.simple.v1+json. PEP 740 says "the index MAY include a provenance key in the file dictionary for that file," and "If provenance is not null, it SHALL be a URL to the associated provenance file." In the HTML index the same signal is a data-provenance attribute on the file link.

  • The Integrity API. The Integrity API documentation gives the path GET /integrity/<project>/<version>/<filename>/provenance. It says "This endpoint is currently only available as JSON," with media type application/vnd.pypi.integrity.v1+json, JSON being the default without an Accept header. It returns "404 Not Found" when the "file has no provenance" and "403 Forbidden" when "access is temporarily disabled by the PyPI administrators."

  • The website. The launch post says PyPI added a page in its web interface "displaying details for individual files."



Terms and limits, as read on November 22, 2026

The PyPI Terms of Service show "Effective date: February 25, 2025," and a separate date line of April 10, 2025 at the end. They say "Abuse or excessively frequent requests to PyPI via the API may result in the temporary or permanent suspension" of access, that the PSF, at its sole discretion, determines what counts as abuse or excessive usage of the API, that "You may not share API tokens to exceed PyPI's rate limitations," and that "You may not use the API to download data or Content from PyPI for spamming purposes." The terms read do not state a numeric rate limit, and the Integrity API page states none. The older PyPI Terms of Use page says it was superseded by the Terms of Service on February 25, 2025.



Known traps

  • Attestation is often automatic. The launch post says "The generation and publication of attestations happens by default" for projects that publish from GitHub Actions via Trusted Publishing with the pypa/gh-action-pypi-publish action. A present attestation may reflect that default setting rather than a separate choice by the maintainer.

  • No attestation does not mean tampering. Only the three listed identities can sign, and the documentation says "Files published from ActiveState will not display attestations on PyPI." The launch post also says maintainers "can also manually generate and publish attestations," though it does not recommend it.

  • Check each file. The Integrity API path names a single filename and the index puts provenance in each file's entry, so a check of one file says nothing about a release's other files.

  • The PEP sets no installer rule. PEP 740 says it "does not make a policy recommendation around mandatory digital attestations on release uploads," and that it "does not increase (or decrease) trust in the index itself."

  • Signatures are checked at upload. The launch post says "PyPI only permits attestations with a verifiable signature to be uploaded and redistributed by the index."



What Glasp measured on PyPI

Two Glasp Research deposits on Zenodo measured something on PyPI. Each is AI-assisted and has had no human peer review, and each is cited only for what it measured.

For vulnerability data that sits beside package checks, see the Glasp guide to NVD, CISA KEV and EPSS.



FAQ

How can one file's attestation be checked without a tool?

Request the Integrity API path for that project, version and filename; PyPI's documentation says a 404 means the file has no provenance. PyPI's launch post also describes a web page with details for individual files.

Which publishers can sign PyPI attestations?

PyPI's documentation lists GitHub Actions, GitLab CI/CD and Google Cloud, and says ActiveState does not currently produce attestations.

Does an attestation mean a package is safe?

PyPI's documentation says an attestation lets users verify that a package "was attested to by a particular identity." It does not describe it as a safety review.

Is there a published rate limit?

The Terms of Service warn against excessive API use and mention PyPI's rate limitations, but the pages read give no number.

Compiled by Glasp from public pages read on November 22, 2026. Terms and documentation are quoted as they appeared that day and may change; check PyPI's pages before relying on them.

Comments

Add a comment