← Back to DAGDA | Support | Source: https://docs.pypi.org/using-pypi/package-security/provenance/
Skip to content

Checking Provenance - where a package came from

What is Provenance?

Provenance describes where a release file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details.

What is an attestation?

An attestation describes how, when, and where a package was built or published.

The presence of an attestation, and the information within it, can help protect you from account takeover attacks and supply chain attacks.

Attestations can be verified, confirming that a file really came from the source it claims to come from.

Attestations on PyPI

If a file on PyPI has an attestation, it is displayed:

  1. On the "Security" tab
  2. On the file detail page

Attestations contain key details about the origin of the file, which may include:

  • What source repository and source commit was used to build or publish the package
  • What platform (e.g. GitHub Actions) built or published the package
  • What workflow built or published the package

Each attestation is recorded in a public ledger as a transparency log entry (example), which is a permanent, auditable record that cannot be changed.

Attestation types

PyPI currently supports two types of attestations:

1. PyPI publish attestations

An attestation, created and signed by the uploading workflow, confirming that a file was uploaded via a supported PyPI Trusted Publisher, and that a specific Trusted Publisher identity was used to publish the file, such as a particular GitHub Actions workflow.

PyPI verifies this attestation at upload time, confirming that the identity matches what the package maintainer previously configured for Trusted Publishing.

Currently, the majority of attestations on PyPI are PyPI publish attestations. This is because producing these attestations happens by default (unless disabled) in the canonical workflow used by many package maintainers to publish packages.

A PyPI publish attestation on PyPI

An example PyPI Publish attestation on PyPI

2. SLSA attestations

An attestation and associated transparency log, signed by the build platform (e.g., GitHub, Google Cloud), that details exactly how the file was produced, cryptographically linking the final artifact back to its original source code (if available), build instructions or build log.

A SLSA attestation on PyPI

An example SLSA Build Provenance attestation on PyPI

Verifying attestations

Verifying an attestation confirms that the release file really came from the source it claims to come from.

Verification isn't yet built into common package installers, but third-party tools exist today — for example, pip-plugin-pep740 verifies attestations before allowing an install to proceed. Native support has been proposed for both pip and uv, but neither is actively in development yet.

In the meantime, users can manually verify attestations by retrieving them from PyPI's Integrity API. See our documentation on consuming attestations for additional information.

No provenance

"No provenance" simply means that no file in the release has an attestation. This is typical for older releases or projects that have not configured Trusted Publishing with attestations. No provenance does not necessarily indicate that a release or release file is malicious; it instead means that the file origin cannot be cryptographically verified.

When there is no provenance, you should rely on surrounding trust signals to assess security, such as maintainer history, release patterns, and repository activity. If you maintain the package, consider using Trusted Publishing with a publisher that generates attestations for your next release.

Provenance/attestation warnings

When a release's provenance looks unusual or conflicts with the project's history, PyPI displays a warning. These warnings help you identify files that may not have come from the project's maintainers, for example if an attacker has taken over an account or a publishing workflow (see supply chain attacks).

Many warnings have legitimate explanations, but each one is worth checking before you install.

Incomplete provenance

  • What it means: A portion of the files in this release were uploaded without an attestation.
  • Why it matters: This can be a deliberate choice by the maintainers (such as mixing manual uploads with automated CI workflows), a build or publishing configuration error, or a sign that some of the files were uploaded by a malicious actor.
  • What to do: Check the release notes for build issues, or ask in the project's issue tracker before installing.

Inconsistent provenance

  • What it means: The attestation metadata indicates that the release files were produced by different, unrelated build or publishing pipelines, or originated from different source repositories.
  • Why it matters: A release's files usually share the same provenance. If files within the same release exhibit different provenances, it can suggest that some or all of the files come from a malicious source.
  • What to do: Check the attestation metadata to confirm that all files came from sources controlled by the maintainers.

Change of provenance

  • What it means: The build or publishing pipeline or source identity that made the release files differ from a previous release.
  • Why it matters: While this is often the result of a legitimate infrastructure migration (e.g., moving a project to a new GitHub organization or switching to a different CI platform), it can also be a signal of a supply chain attack or account takeover.
  • What to do: Inspect the attestation metadata to see what changed, such as a new source repository or workflow. Check the project's release notes or official communication channels to confirm that the change was an intentional transition by the maintainers.

Loss of provenance

  • What it means: Either:
    • The maintainers previously used secure, verifiable build or publishing methods (such as Trusted Publishing), but have changed to a manual or unverified process, or
    • The maintainers have changed their publishing configuration to no longer produce an attestation.
  • Why it matters: While this may simply reflect a conscious choice by the maintainers to change their publishing workflow, it can also signal an account takeover where an attacker has bypassed secure publishing requirements.
  • What to do: Check the project's security policy, release notes or recent announcements to confirm that the maintainers intentionally changed their publishing process.

Note

"Change of provenance" and "Loss of provenance" warnings are only raised when the provenance of the release files differs from a release made in the preceding 14 days.

Attestation limitations

Attestations are a big step forward for securing the Python packaging ecosystem, but they do have limitations:

  • Code Safety: An attestation only tells you where a file came from. It does not mean the original code or the build environment is safe or trustworthy.

  • Implicit Trust: When you trust an attestation, you are implicitly trusting the processes and authority of the organization that issued it.

See the attestations security model documentation for a more detailed look into what attestations actually assert, and the trust assumptions behind them.