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

nazar-audit

v0.1.1

Published

A modern, security-conscious package vulnerability scanner for the JavaScript ecosystem. Wraps npm/pnpm/yarn audit with exception management, multiple output formats, and fix availability reporting.

Readme

nazar-audit

A modern, security-conscious package vulnerability scanner for the JavaScript ecosystem.

Named after the nazar, the protective eye amulet found across the Mediterranean that wards off malicious intent.

CI npm version License: MIT

Features

  • Wraps npm audit --json with structured output and exit code control
  • Exception management with expiry dates, notes, and audit trail (.nazar.yml)
  • Multiple output formats: colored table with severity breakdown, normalized JSON
  • Dependency paths showing the full chain for each advisory
  • Fix availability display showing upgrade paths and breaking change warnings
  • Severity thresholds that independently control exit behavior and table display
  • Fail-on modes for CI -- fail only on fixable vulnerabilities (--fail-on upgradable|patchable)
  • Secure by design -- uses execFile (no shell injection), validates all external data with Valibot
  • Windows compatible -- handles npm.cmd shims automatically
  • Five runtime dependencies: citty, yaml, picocolors, valibot, nanospinner

Installation

npm install -g nazar-audit
# or
npx nazar-audit

Quick Start

# Run an audit
nazar-audit

# Set severity threshold (exit non-zero only for high+)
nazar-audit --level high

# Ignore specific advisories
nazar-audit --ignore GHSA-xxxx,CVE-2024-1234

# JSON output (suppresses banner and spinner)
nazar-audit --format json

# Filter table display while keeping full exit behavior
nazar-audit --level moderate --filter-table high

# Only fail CI when a fix is actually available
nazar-audit --fail-on upgradable

# Skip devDependencies
nazar-audit --production

# Custom timeout for slow registries
nazar-audit --timeout 120

Configuration

Create a .nazar.yml file in your project root to manage exceptions and defaults:

# Minimum severity for non-zero exit
level: high

# Which vulnerabilities count toward exit code: all (default), upgradable, patchable
failOn: upgradable

# npm audit timeout in seconds (default: 60)
timeoutSeconds: 120

# Skip devDependencies
production: false

exceptions:
  - id: "GHSA-xxxx-yyyy-zzzz"
    expiry: "2025-06-01"
    notes: "No impact -- we don't use the affected API"
    addedBy: "jrodger"

  - module: "minimist"
    notes: "Dev-only transitive dependency, not exposed"

  - id: "CVE-2024-1234"
    active: false
    notes: "Re-enabled after patch lands"

  - id: 1234567
    notes: "Accepted numeric npm advisory source ID"

Exception IDs may be quoted strings such as GHSA, CVE, or UUID-style values, or unquoted integer npm advisory source IDs. Numeric IDs are normalized to strings internally. nazar-audit lists matched exception IDs and package names and warns about unused or expired entries.

CLI Options

| Flag | Alias | Description | |---|---|---| | --level <severity> | -l | Minimum severity for non-zero exit (info, low, moderate, high, critical) | | --filter-table <severity> | | Only show rows at or above this severity in the table | | --format <type> | -f | Output format: table (default) or json | | --ignore <ids> | -i | Advisory IDs to ignore (comma-separated GHSA/CVE) | | --production | -p | Pass --omit=dev to npm audit (default: false) | | --fail-on <mode> | | Which vulnerabilities count toward exit code: all (default), upgradable, patchable | | --timeout <seconds> | | npm audit timeout in seconds (default: 60) | | --config <path> | | Path to .nazar.yml config file |

--level, --format, --filter-table, --production, --fail-on, and --timeout on the CLI take precedence over the matching .nazar.yml values. --ignore merges with (rather than replaces) config-file exceptions.

Exit Codes

| Code | Meaning | |---|---| | 0 | No unhandled vulnerabilities above threshold | | 1 | Unhandled vulnerabilities meeting both --level and --fail-on criteria | | 2 | Scanner error (network, parse failure, invalid config) |

Requirements

  • Node.js >= 22.0.0
  • npm >= 10 (ships with Node 22+)

Documentation

See the docs folder for the full roadmap and technical details:

Development

npm install
npm run ship             # full quality gate: audit, depcheck, jscpd, license-check, format, lint, typecheck, build, self-audit, test
npm run test:watch       # vitest in watch mode
npm run test:coverage    # vitest with coverage report
npm run test:mutation    # stryker mutation testing
npm run lint:fix         # auto-fix lint issues
npm run depcheck         # check for unused dependencies (knip)
npm run license-check    # check dependency licenses
npm run jscpd            # check for duplicate code

License

MIT