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

@sergiovalerdev/dependency-validator

v0.1.0

Published

Dependency hygiene and supply chain security analysis for npm projects

Downloads

79

Readme

@sergiovalerdev/dependency-validator

Dependency hygiene and supply chain security analysis for npm projects.

Validates that your dependencies exist on the official registry, detects suspicious origins (git URLs, file paths, custom registries), and calculates a security score from 0 to 100.

This tool does NOT scan for CVEs. It focuses on dependency supply chain hygiene.

Installation

npm install -g @sergiovalerdev/dependency-validator

Or as a dev dependency:

npm install -D @sergiovalerdev/dependency-validator

CLI Usage

# Analyze the current project
dependency-validator

# Analyze a specific path
dependency-validator ./my-project

# CI mode (exit non-zero on failure)
dependency-validator --ci

# Strict mode (fail on any warning)
dependency-validator --strict

# Custom minimum score
dependency-validator --ci --min-score 90

# JSON output
dependency-validator --json

# Verbose logging
dependency-validator --verbose

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success (or informational mode) | | 1 | Score below threshold (--ci) or warnings found (--strict) | | 2 | Critical errors found (e.g., packages not on registry) | | 3 | Runtime error (missing files, network failure) |

In default mode (without --ci or --strict), the tool always exits with code 0.

Scoring System

The security score starts at 100 and is reduced by issues:

| Issue | Deduction | Severity | |-------|-----------|----------| | Package not found on registry | -10 | ERROR | | Version not found on registry | -10 | ERROR | | Git dependency | -5 | WARNING | | File/link dependency | -5 | WARNING | | Custom registry | -3 | WARNING |

The score is floored at 0.

Programmatic API

import { analyze } from '@sergiovalerdev/dependency-validator';

const report = await analyze('./my-project');
console.log(report.score.score); // 0-100
console.log(report.issues);      // ValidationIssue[]

CI Integration

GitHub Actions

- name: Check dependency hygiene
  run: npx @sergiovalerdev/dependency-validator --ci --min-score 80

npm scripts

{
  "scripts": {
    "check:deps": "dependency-validator --ci"
  }
}

Supported Package Managers

  • npm (package-lock.json v2/v3)
  • yarn (yarn.lock v1)
  • pnpm (planned for v1.1.0)

When no lockfile is found, the tool falls back to analyzing package.json only.

What It Detects

  • Non-existent packages: Dependencies not found on the npm registry
  • Non-existent versions: Locked versions that don't exist on the registry
  • Git dependencies: Packages installed from git repositories
  • File dependencies: Packages installed from local file paths
  • Custom registries: Packages resolved from non-standard registries

Limitations

  • Does not scan for CVEs or known vulnerabilities (use npm audit for that)
  • pnpm lockfile support is planned for v1.1.0
  • Yarn Berry (v2+) lockfiles are not yet supported
  • Monorepo/workspace analysis is planned for v1.1.0

License

MIT