npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

npm-provenance-checker

v0.1.2

Published

Batch-verify npm provenance attestations across your project's lockfile. CLI + GitHub Action.

Readme

npm-provenance-checker

Batch-verify npm provenance attestations across your project's lockfile. No node_modules required.

The problem: npm audit signatures requires an installed node_modules tree and produces no exportable report. There's no open-source tool that batch-checks provenance attestations from a lockfile alone.

npm-provenance-checker parses your lockfile (npm, yarn, pnpm), checks each dependency against the npm registry for SLSA provenance attestations, and outputs a tiered compliance report with a score.

Quick Start

# Run in any project with a lockfile
npx npm-provenance-checker

# Check only production deps with a minimum score
npx npm-provenance-checker --prod-only --threshold 80

# Output JSON report
npx npm-provenance-checker --format json --output report.json

# Output HTML report
npx npm-provenance-checker --format html --output report.html

CLI Usage

npm-provenance-checker [options]

Options:
  --lockfile <path>     path to lockfile (auto-detected)
  --format <fmt>        output format: text, json, html (default: text)
  --threshold <0-100>   fail if score below this (default: 0)
  --prod-only           only check production dependencies
  --output <path>       write report to file
  --concurrency <n>     concurrent registry requests (default: 20)
  -V, --version         output version
  -h, --help            display help

Exit Codes

| Code | Meaning | |------|---------| | 0 | Pass — score meets or exceeds threshold | | 1 | Fail — score below threshold | | 2 | Runtime error |

GitHub Action

name: Provenance Check
on: [push, pull_request]

jobs:
  provenance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: mattschaller/npm-provenance-checker@v0
        with:
          threshold: '70'
          prod-only: 'true'

Action Inputs

| Input | Description | Default | |-------|-------------|---------| | lockfile | Path to lockfile | auto-detected | | format | Output format: text, json, html | text | | threshold | Minimum score (0-100) | 0 | | prod-only | Only check prod deps | false | | concurrency | Max concurrent requests | 20 |

Programmatic API

import { checkProvenance, parseLockfile, fetchAllAttestations, computeResults } from 'npm-provenance-checker';

// High-level: check a project
const result = await checkProvenance({ prodOnly: true, threshold: 80 });
console.log(result.summary.score);

// Low-level: parse + check + compute
const deps = parseLockfile('package-lock.json');
const attestations = await fetchAllAttestations(deps);
const result = computeResults(attestations, { prodOnly: true });

Lockfile Support

| Lockfile | Format | Dev detection | |----------|--------|---------------| | package-lock.json | v3 (npm 7+) | dev/devOptional fields | | yarn.lock | v1 | Cross-reference with package.json | | pnpm-lock.yaml | v5, v6+ | dev field |

Scoring

The provenance score is computed from production dependencies only:

score = round((prod_attested / prod_total) * 100)

Each dependency is classified into one of three tiers:

  • Attested — has SLSA provenance attestation (dist.attestations.provenance)
  • Signed-only — has registry signatures but no provenance (dist.signatures)
  • Unattested — neither signatures nor provenance

Dev dependencies are reported but do not affect the score.

Related

License

MIT