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

@cyberhub/pkgtrust

v0.3.0

Published

Trust scoring for npm packages — maintainer risk, package health, and supply chain signals

Readme

pkgtrust

Trust scoring for npm packages — maintainer risk, package health, and supply chain signals.

Before you npm install, know what you're getting into.

# Install globally (recommended)
npm install -g @cyberhub/pkgtrust
pkgtrust scan express

# Or use via npx
npx --package=@cyberhub/pkgtrust pkgtrust scan express
  [email protected]
  ████████████████░░░░ 82/100 A TRUSTED
  Confidence: high

  Breakdown:
    Maintainer Trust:  ██████████████████░░ 88
    Package Health:    ████████████████░░░░ 78
    Supply Chain:      ████████████████████ 95
    Community:         ██████████████░░░░░░ 72

  Flags:
    MEDIUM   30 direct dependencies
    LOW      No provenance attestation on latest version
    INFO     Published with 2FA enabled (signed)

Install

# Install globally (recommended)
npm install -g @cyberhub/pkgtrust

# Then use from anywhere
pkgtrust scan lodash
pkgtrust compare axios got node-fetch
pkgtrust maintainer sindresorhus

# Or use via npx (no install needed)
npx --package=@cyberhub/pkgtrust pkgtrust scan lodash

Commands

Scan a package

pkgtrust scan express
pkgtrust scan @anthropic-ai/sdk
pkgtrust scan react --json

Scan your project

Scans all dependencies in package.json:

pkgtrust scan

Compare packages

pkgtrust compare axios got node-fetch

Output:

  Metric               axios        got          node-fetch
  ─────────────────── ──────────── ──────────── ────────────
  Trust Score          78           82           85
  Grade                B+           A            A
  Maintainer Trust     75           80           90
  Package Health       80           85           82
  Supply Chain         85           90           95
  Flags                3            2            1

  Winner: node-fetch

Maintainer lookup

pkgtrust maintainer sindresorhus

CI gate

Fail the build if any dependency scores below threshold:

pkgtrust gate --min-score=50

Exit code 0 = pass, 1 = fail. Use in CI:

- run: npx @cyberhub/pkgtrust gate --min-score=50

JSON output

pkgtrust scan express --json
pkgtrust scan --json > trust-report.json

Scoring Methodology

Each package gets a composite trust score (0-100) from four categories:

| Category | Weight | What it measures | |----------|--------|-----------------| | Maintainer Trust | 40% | Account age, publication record, maintainer changes, multi-maintainer, publish cadence, email domain, 2FA | | Package Health | 30% | Install scripts, dependency count, license, provenance, size changes, binary detection, deprecation | | Supply Chain | 20% | Typosquatting risk, known compromises, source-registry consistency | | Community | 10% | GitHub stars, contributors, commit recency, CI, downloads |

Grades

| Grade | Score | Tier | |-------|-------|------| | A+ | 95-100 | Trusted | | A | 85-94 | Trusted | | B+ | 75-84 | Standard | | B | 65-74 | Standard | | C+ | 55-64 | Caution | | C | 45-54 | Caution | | D | 30-44 | Caution | | F | 0-29 | Avoid |

Confidence

Shows how many data signals were available:

  • High — 70%+ of signals available (npm metadata + GitHub + downloads)
  • Medium — 40-69% signals
  • Low — <40% signals (score less reliable)

Known Compromise Database

pkgtrust cross-references against historically compromised packages:

| Package | Incident | |---------|----------| | event-stream | Malicious flatmap-stream injection (2018) | | ua-parser-js | Cryptominer in v0.7.29/0.8.0/1.0.0 (2021) | | colors | Maintainer sabotaged with infinite loop (2022) | | faker | Maintainer deleted all code (2022) | | node-ipc | Protestware targeting Russian IPs (2022) | | @ledgerhq/connect-kit | Wallet drainer injection (2023) |

Programmatic API

import { scanPackage, scanProject, comparePackages } from '@cyberhub/pkgtrust';

// Score a single package
const score = await scanPackage('express');
console.log(score.score, score.grade, score.tier);

// Scan project dependencies
const result = await scanProject('./my-project');
console.log(result.summary.averageScore);

// Compare alternatives
const comparison = await comparePackages(['axios', 'got', 'node-fetch']);
console.log(comparison.winner);

Options

| Flag | Description | |------|-------------| | --json | Output as JSON | | --min-score=N | Gate threshold (default: 50) | | --sync | Sync scores to nrupak.com for trending |

How it works

  1. Fetches package metadata from registry.npmjs.org
  2. Queries 8 security databases in parallel (GitHub Advisories, OSV.dev, npm audit, Snyk, Socket.dev, npms.io, Bundlephobia, deps.dev)
  3. Fetches GitHub repo health and OpenSSF Scorecard
  4. Scores across 18+ signals in 4 categories with live CVE data
  5. Applies transitive risk — if your dependency depends on a breached package, you get flagged
  6. Applies maintainer cross-reference — if a maintainer has compromised history, all their packages get flagged
  7. Produces composite score with letter grade and risk tier
  8. Stores results locally + optionally syncs to nrupak.com dashboard

Features

  • 8 Security Databases: GitHub Advisories, OSV.dev, npm audit, Snyk, Socket.dev, npms.io, Bundlephobia, deps.dev
  • Transitive Risk: Flags packages that depend on breached dependencies
  • Maintainer Cross-Reference: Flags packages by compromised maintainers
  • Package Compare: pkgtrust compare axios got node-fetch
  • CI Gate: pkgtrust gate --min-score=50 fails builds below threshold
  • Dependency Tree: Visualizes full dep chain with vuln indicators
  • GitHub PR Bot: Auto-comments trust scores on PRs with dependency changes
  • Leaderboard: Top packages ranked by trust at nrupak.com/trust/leaderboard
  • Verified Maintainers: Maintainers can claim and verify their profiles

Dashboard

Public trust scores at nrupak.com/trust:

  • Search: Look up any npm package or maintainer
  • Browse: Filter all scored packages by tier, sort by score/date
  • Compare: Side-by-side comparison at /trust/compare
  • Leaderboard: Top packages ranked at /trust/leaderboard
  • Maintainer Profiles: OSINT view with GitHub data, packages, verified badges
  • GitHub PR Bot: Setup at /trust/github-app

Zero Dependencies

pkgtrust has zero runtime dependencies. Built with only Node.js built-in fetch API.

License

MIT — Nrupak Shah

Links