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

vuln-guardian

v0.1.1

Published

Scan a Node.js project for npm dependency vulnerabilities and auto-fix the safe ones. Ships a CLI, a library API, and a GitHub Actions workflow generator for daily checks.

Readme

vuln-guardian

Scan a Node.js project for known dependency vulnerabilities (npm audit) and auto-fix the safe ones — as a CLI, a library, or a daily GitHub Actions job.

Why not just run npm audit fix daily?

You can, and under the hood that's exactly what this does. vuln-guardian adds three things on top: a severity gate for CI (fail the build only on high/critical, ignore low-severity noise), a daily-schedule generator (there's no way for a published npm package to keep running after npm install finishes, so "every day" has to live somewhere — CI cron is the standard place, same mechanism Dependabot uses), and a safe-by-default fix mode (npm audit fix only; --force, which can bump major versions and break your build, is opt-in).

Install

npm install --save-dev vuln-guardian
# or run without installing:
npx vuln-guardian scan

CLI

vuln-guardian scan

Runs npm audit and prints/writes a Markdown report.

vuln-guardian scan --dir . --report report.md --fail-on high
  • --fail-on <severity> — exit non-zero if a vulnerability at or above this severity (info|low|moderate|high|critical) is found. Useful for CI gates.

vuln-guardian fix

Applies npm audit fix (non-breaking fixes only, by default) and reports what changed.

vuln-guardian fix --dir . --report fix-report.md
vuln-guardian fix --force   # allow major version bumps — may break your build

vuln-guardian ci

The one-shot command for automation: scans, applies safe fixes, writes a report, and fails (exit code 1) if high/critical vulnerabilities remain after fixing.

vuln-guardian ci --report vuln-guardian-report.md --fail-on high

vuln-guardian init-workflow

Writes a GitHub Actions workflow that runs daily, applies safe fixes, opens a pull request with the changes, and fails the run if high/critical vulnerabilities remain unresolved.

vuln-guardian init-workflow
# writes .github/workflows/vuln-guardian.yml

Options: --cron '0 6 * * *' (UTC), --base-branch main, --node-version 20, --out <path>.

The generated workflow needs contents: write and pull-requests: write permissions (already set) and uses peter-evans/create-pull-request to open the PR — no extra secrets required beyond the default GITHUB_TOKEN.

vuln-guardian daemon

For self-hosted setups (a server or container that stays running) instead of CI: runs the same scan-and-fix cycle on a cron schedule inside a long-lived Node process.

vuln-guardian daemon --cron '0 3 * * *' --dir . --report report.md

Library API

import { scan, fix, meetsThreshold, scanToMarkdown } from 'vuln-guardian';

const result = await scan('./my-project');
console.log(scanToMarkdown(result));

if (meetsThreshold(result.summary, 'high')) {
  const fixed = await fix('./my-project'); // safe fixes only
  console.log(`Fixed ${fixed.fixedCount}, ${fixed.remainingCount} remain`);
}

How "safe" fixing works

vuln-guardian fix runs npm audit fix without --force, so it only applies changes npm considers non-breaking (patch/minor bumps within your existing semver ranges). Vulnerabilities that require a major version bump are left for a human — or for --force, which you should treat as "review the diff before merging," not "fire and forget."

Limitations

  • Wraps npm audit, so it inherits its coverage (the npm/GitHub Advisory Database) and its blind spots — it does not run its own vulnerability scan.
  • Only supports npm (not yarn/pnpm) for now.
  • --force fixes can change major versions and break your code; always review the resulting diff / PR before merging.