npm provenance provides verifiable information about where and how a package was built. npm uses a provenance attestation to link the package to its source code and build instructions. A publish attestation records that an authorized user published the package through the registry. The two attestations capture different information about the build and publish stages.
According to npm, Sigstore signs packages published with provenance and records them in a public transparency ledger that users can inspect. Developers can verify where and how a package was built before downloading it.
What does provenance show?
GitHub describes provenance as a verifiable way to link a published package to its source repository and the specific build instructions used to publish it. That link shows which code and build process are associated with the published package.
In GitHub's example, provenance includes metadata about the repository and build as well as the package. The example includes environment fields such as GITHUB_REPOSITORY, GITHUB_SHA, GITHUB_RUN_ID, and GITHUB_WORKFLOW_REF. It also records the repository URI and commit digest.
In the SLSA provenance model, subject identifies the artifact or artifacts produced by the build. buildDefinition describes the inputs used for the build. runDetails contains information about a specific build run. According to SLSA, this structure lets you verify that the artifact was built as expected and rebuild it if needed.
In the SLSA model, buildType identifies the template that defines how the build runs and how to interpret its parameters and dependencies. externalParameters contains parameters set outside the build platform. SLSA treats these values as untrusted inputs and requires that they be included in the provenance and verified downstream.
internalParameters contains parameters controlled by the entity identified by builder.id. SLSA defines this field for debugging, incident response, and vulnerability management. Its values may also be needed to reproduce the build.
According to SLSA, externalParameters and internalParameters are top-level inputs to the template that are independent of other inputs. Each field is defined as a JSON object. The parameters contain the values passed to the build platform's interface. Metadata such as digests for artifacts referenced by those parameters can go in resolvedDependencies.
resolvedDependencies is an unordered collection of artifacts needed during the build. SLSA defines this field to support recursive analysis of the software supply chain. When a build uses a Git repository URI, the specific Git commit it resolves to can be recorded as a dependency if known. SLSA describes the completeness of the dependency list as a best-effort property.
Within runDetails, builder identifies the build platform that carried out the run. metadata holds information about that build run. The invocationId field identifies the specific run and can be used to find its logs. According to SLSA, builder.id determines the meaning and format of this value, which is case-sensitive by default.
SLSA's builderDependencies field covers dependencies that the orchestrator uses outside the workload. They have no effect on the build itself, but they can affect how provenance is generated or what security guarantees it provides. byproducts holds additional artifacts generated during the build that fall outside its declared outputs. Examples include build logs and the digest of the evaluated build configuration.
Signing and registry verification
According to the npm provenance project, the signing process requests an OIDC ID token from the CI/CD environment and generates a temporary public/private key pair. Proof of possession of the private key is sent to Fulcio along with the ID token and public key. Fulcio issues the signing certificate. The provenance statement is signed and uploaded to Rekor, and the keys are deleted.
npm describes Sigstore as a collection of tools and services for signing software with short-lived certificates. The certificate authority verifies the integrity of the OIDC token and issues a signing certificate that includes build information. The transparency log provides a public, verifiable, tamper-evident ledger for signed attestations.