A typosquatted package built by the attacker's own GitHub Actions workflow carries perfectly valid SLSA provenance, so "does this have provenance?" is a question it answers yes to. Only two of the four mechanisms below refuse to verify anything until you name the repository you were expecting, and that single design choice decides whether provenance is an authenticity control or a receipt. If your agent installs dependencies, it is asking the first question and has no concept of the second.
At a glance
All four produce the same shape of evidence: a signed statement binding an artifact digest to the identity that built it. They differ on who checks it and on what you have to state for the check to mean anything.
| Mechanism | What it binds | Who checks it | What you must state |
|---|---|---|---|
| npm provenance | Package digest to a SLSA v1 build: builder, source repo, workflow path, git ref. | npm audit signatures, in the npm CLI you already run. |
Nothing. |
| PyPI attestations (PEP 740) | File digest to a publisher: kind, repository, workflow, environment. | Nothing in pip's documented secure-install path; a separate Integrity API and third-party tooling. | Nothing. |
| cosign | Any blob or image digest to whatever identity signed it. | You, explicitly, as a step you add. | A certificate identity and an OIDC issuer — it refuses keyless verification without both. |
| slsa-verifier | Artifact digest to SLSA provenance from a recognised builder. | You, explicitly. | --source-uri: the source repository that should have produced the binary. |
Coverage, measured rather than asserted
Provenance adoption is usually discussed in the abstract, so here is a hand sample taken straight from the registries on 29 November 2026. On npm, provenance arrives inside the packument every install already downloads, as a dist.attestations object. Seven of eight widely used packages had one: sigstore 5.0.1, @sigstore/sign 5.1.0, express 5.3.0, @modelcontextprotocol/sdk 1.32.2, zod 4.6.7, react 19.3.1 and vite 8.4.0. The exception was typescript 7.0.2, which carried a registry signature and no attestation.
On PyPI the answer is per file and lives behind the Integrity API at /integrity/<project>/<version>/<filename>/provenance. Four of seven returned a bundle — mcp 2.3.0, pydantic 2.14.4, cryptography 50.0.2 and numpy 2.5.5 — while uv 0.13.10, httpx 0.29.0 and fastapi 0.165.0 answered No provenance available. Small samples, chosen by hand, and not a survey; the useful part is that both numbers are now high enough that "it probably has none" has stopped being a safe default assumption.
One detail matters more than the ratio. PyPI's older JSON API, /pypi/<name>/json, has no provenance field on its urls[] entries at all — the keys are filename, digests, sizes, upload times and yanked status. Any tool that reads that endpoint to decide whether a release is attested will conclude that nothing on PyPI is, including the four above that are. The information exists; it is one endpoint to the left of where most tooling looks.
What an attestation actually says
It is worth reading one, because the contents explain both the strength and the gap. Fetching zod 4.6.7's bundle from npm returns two attestations: npm's own publish attestation, and a SLSA provenance statement whose predicate type is https://slsa.dev/provenance/v1. Decoded, the payload names the builder as https://github.com/actions/runner/github-hosted and the external parameters as the workflow .github/workflows/release.yml at refs/heads/main in https://github.com/colinhacks/zod, over a subject of pkg:npm/zod@4.6.7 with its SHA-512.
PyPI's equivalent for mcp 2.3.0 is shaped differently and deliberately so. Its predicate type is https://docs.pypi.org/attestations/publish/v1 and the bundle carries a publisher object: kind GitHub, repository modelcontextprotocol/python-sdk, workflow publish-pypi.yml, environment release, over the wheel's SHA-256. npm's predicate describes a build; PyPI's describes a publication. Both answer "which repository and workflow produced this file", which is the question that matters, and they answer it in incompatible vocabularies.
Now notice what neither statement contains: anything about whether that repository is the one you meant to depend on. The attestation is a faithful record of a real build by a real identity. A package called zod-utils published from github.com/attacker/zod-utils via its own GitHub Actions workflow produces an equally faithful record, signs it the same way, and lands in the transparency log beside the genuine one.
The axis that decides: who has to name the identity
Here the four split cleanly in two, and the split is visible in the command-line interfaces. npm audit signatures takes no expectation: it verifies the registry signatures of what you downloaded and, as the npm documentation puts it, will also verify the provenance attestations of downloaded packages. It is the only one of the four that runs inside a workflow a developer already has, and it is the only one of the four that cannot fail for the reason you most want it to.
cosign goes the other way and makes the expectation mandatory. In keyless flows, either --certificate-identity or --certificate-identity-regexp must be set, and either --certificate-oidc-issuer or --certificate-oidc-issuer-regexp must be set — the tool will not verify a Sigstore bundle without being told whose signature it should be and which issuer vouched for it. slsa-verifier does the same thing in one flag: verify-artifact takes --source-uri, documented as the expected source repository that should have produced the binary, and it also ships a verify-npm-package command so you can apply that discipline to the registry case npm's own audit cannot.
Read as a design argument rather than a feature list: a verification tool that can succeed without an expectation has been built for integrity, and one that refuses to run without an expectation has been built for authenticity. Both are legitimate; they are not substitutes. The failure is reaching for the first and reporting the second to your security review, which is the same category error as measuring an attack success rate against a benchmark your attacker was not drawn from.
pip's answer is to a different question
PyPI publishes attestations; pip's documented story for secure installation does not use them. Its "Secure installs" page is about hash-checking mode: pass --require-hashes, pin every requirement including transitive ones, and carry a local --hash=sha256:… for each. The page is explicit about the limit of the convenient version, noting that a hash which originates remotely is not a useful guard against tampering and therefore does not satisfy the --require-hashes demand that every package have a local hash.
That is a coherent and strong position, and it answers "is this byte-for-byte the artifact I previously reviewed?" rather than "who built this?". The two compose well: a hash pin stops substitution of a package you already trust, and provenance tells you whether to trust a version you have not seen. Neither does the other's job, and a lockfile with hashes plus an unverified first adoption is the common shape of real-world exposure — the lockfile faithfully pins whatever you accepted on day one.
If you want PEP 740 verification in Python today it is an out-of-band step: the Integrity API for retrieval, and tooling such as the pypi-attestations library (0.0.32 at the time of writing) to convert between Sigstore bundles and PEP 740 attestation objects. That is a perfectly workable CI step. It is not something an agent running pip install does.
When to pick which
| Situation | Use | Because |
|---|---|---|
| You want a floor across an existing JavaScript estate, this week. | npm audit signatures in CI. |
Zero new infrastructure, catches tampered and unsigned artifacts, and tells you your coverage. |
| You have a short list of dependencies you genuinely care about. | slsa-verifier with --source-uri, pinned per package. |
It is the only cheap way to assert "this came from that repo", which is the claim that stops a substituted package. |
| You ship or consume container images, binaries or models. | cosign with an identity and issuer. |
Registry mechanisms stop at the registry; cosign covers any blob, and forces the expectation. |
| Your stack is Python. | Hash pinning now, Integrity API checks in CI for the dependencies that matter. | PyPI has the attestations; the installer does not read them, so the check has to be yours. |
What changes when an agent is the one installing
Everything above is ordinary supply-chain hygiene until the thing resolving dependencies is a coding agent, at which point three properties of this comparison become load-bearing.
The agent's install step is the default path, so only the default-path check runs. An agent told to add a library will run the package manager, and the only verification that happens is whatever the package manager does unasked. That makes the convenience axis in the matrix above the one that describes your actual posture, not the capability axis.
An agent cannot supply the expectation, because it does not have one. --source-uri and --certificate-identity are only meaningful if someone decided in advance which repository is correct for a given name. That decision is a policy artefact — a mapping from package name to expected source — and it belongs in your repository next to the lockfile, where the agent reads it rather than invents it. Without it, a model asked to "verify the package" will run the check that passes. That is the practical form of the argument in pinning and verification.
Provenance says nothing about behaviour. A faithfully attested package from exactly the right repository can still contain an install script that runs at install time and an agent that will never read it. Provenance answers authorship, not intent; the rest is the ground covered by agent supply-chain security and, for the adjacent case of an installed capability rather than a dependency, vetting a third-party skill.
The single highest-value change is small and unglamorous: write down the expected source repository for your top dependencies, feed it to slsa-verifier or cosign in CI, and let npm audit signatures be the floor rather than the ceiling. A check that cannot fail is documentation.
FAQ
Does npm provenance stop a typosquatted package?
No. Provenance proves a package was built by a real hosted CI run from a real repository, and a typosquat published from the attacker's own GitHub Actions workflow satisfies that. Stopping it requires comparing the attestation against a source repository you named in advance, which is what slsa-verifier --source-uri and cosign's certificate-identity flags are for.
Does pip verify PEP 740 attestations?
PyPI publishes them and serves them from its Integrity API, but pip's documented secure-install path is hash-checking mode rather than attestation verification — as of 29 November 2026 its "Secure installs" page does not mention attestations, provenance or Sigstore. Verifying them is an explicit CI step using the Integrity API and tooling such as the pypi-attestations library.
Are npm and PyPI attestations the same format?
No. npm emits SLSA provenance v1 describing a build, with builder, source repository, workflow path and git ref. PyPI emits a PyPI-specific publish attestation v1 describing a publication, with publisher kind, repository, workflow and environment. Both identify the producing repository and workflow; neither is a drop-in for the other.
How do I find out whether my dependencies carry provenance?
On npm, read dist.attestations on a version in the registry packument, or run npm audit signatures for the whole tree. On PyPI, call /integrity/<project>/<version>/<filename>/provenance per file; the older JSON API has no provenance field, so a tool reading it will report none.
Is cosign redundant if my registry already does provenance?
Only for packages from that registry. cosign verifies any blob or image against a Sigstore bundle, which covers container images, release binaries, model weights and anything else your agent downloads outside a package manager — and unlike a registry audit command, it will not verify at all until you tell it whose signature to expect.
Further reading
On this wiki:
- Agent supply-chain security — the whole dependency surface an agent touches, not just the signature on it.
- Pinning and verification — why a pin without a verified first adoption just freezes your exposure.
- Vetting a third-party skill — the same problem for installed capabilities rather than libraries.
- Dependency upgrade agents — where this check belongs in an automated upgrade loop.
- Secrets management for agents — the credentials a compromised build step would reach.
Primary sources:
- npm audit documentation — the
audit signaturescommand and what it verifies. - cosign verify-blob — the identity and issuer flags required for keyless flows.
- slsa-verifier —
verify-artifact --source-uriandverify-npm-package. - pip: Secure installs — hash-checking mode and the limits of a remotely obtained hash.