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

@vanshkaushal/slopguard

v0.1.0-alpha.1

Published

Zero-infrastructure npm supply-chain security firewall

Readme

SlopGuard

SlopGuard is a zero-infrastructure npm package validation firewall. It detects hallucinated, typosquatted, or otherwise high-risk packages and blocks or warns before install.

Requirements: Node.js >= 20

Install & build

  • Install dependencies:
npm install
  • Build TypeScript output:
npm run build
  • Run in development (no build):
npm run dev

Quick usage (CLI)

  • Validate a single package:
npx slopguard check react
  • Validate a specific version:
npx slopguard check [email protected]
  • Scan the current folder's dependencies:
npx slopguard scan
  • Recursive workspace scan:
npx slopguard scan --recursive

Commands supported: check <pkg[@version]>, scan, scan-workspace, install <pkg[@version]>.

Flags:

  • --output=json|sarif — Output scan results in JSON or SARIF format
  • --json — Alias for --output=json
  • --sarif — Alias for --output=sarif
  • --policy=<mode> — Override the active policy mode (see Policy Modes below)
  • --offline — Run in offline mode (skip registry checks, 50% score penalty)
  • --dry-run — For install: validate without actually installing
  • --allow — Temporarily allow a package for this run
  • --ignore-warnings — Treat warnings as success (exit code 0)
  • --verify-integrity=shallow|deep|false — Control lockfile integrity verification

Exit codes:

  • 0 = safe
  • 1 = warnings only (non-fatal issues)
  • 2 = hard-blocked (unsafe)
  • 3 = internal error

Policy Modes

SlopGuard comes with several built-in policy packs to suit different environments:

  • permissive: Minimal blocking, warnings only (for experimentation)
  • balanced: Default. Balanced between strictness and usability
  • strict: Tighter controls, provenance recommended
  • paranoid: Maximum strictness. Blocks new packages and missing provenance
  • enterprise-policy: Regulated enterprise environments (requires lockfile, limits max risk, enforces strict age limits)
  • fintech-policy: Financial services (enterprise controls + deep integrity checks and substring blocking)
  • ai-agent-policy: AI/ML pipeline use (relaxed provenance, allows scoped AI ecosystem packages)
  • ci-lockdown-policy: Reproducible CI (frozen lockfiles, fails closed, blocks install scripts)

MCP server (Model Context Protocol)

Run the MCP server (stdio-compatible):

node ./dist/mcp.js

Supported tool calls:

  • check_package — inputs { package, allow?, ignoreWarnings? }
  • scan_package_json — inputs { cwd? }

Both return JSON serialized as text for compatibility.

Example MCP client entry (mcp config):

{
  "mcpServers": {
    "slopguard": {
      "command": "node",
      "args": ["./dist/mcp.js"]
    }
  }
}

GitHub Action

This repository includes action.yml and a compiled action entrypoint (used from dist/action.js). Minimal workflow example:

uses: ./.
with:
  mode: warn
  path: .
  concurrency: 10

Configuration

Create slopguard.config.js in the repo root to override behavior. Example options:

export default {
  thresholds: {
    publisherAgeDays: 30,
    versionAgeHours: 48,
    downloadVelocityMin: 200
  },
  allowlist: [],
  ignored: [],
  disableSignals: {},
  offline: false,
  strict: false
}

Hotlist data is kept in src/data/hotlist.json — edit cautiously. A sample entry:

[{ "name": "reacts", "source": "example", "confidence": 0.9, "notes": "common typo" }]

Scripts

  • npm run build — compile TypeScript
  • npm run dev — run src/cli.ts via ts-node (dev)
  • npm test — run repository tests (scripts/run-tests.mjs)
  • npm run hotlist:validate — validate hotlist format

Development notes

  • Entry points: src/cli.ts, src/mcp/mcp.ts, src/action.ts.
  • Core validation logic is in src/core/ and reused by CLI, MCP server, and the GitHub Action.
  • Tests live in tests/ and can be executed with npm test.

Contributing

See CONTRIBUTING.md for contribution workflow and hotlist rules.

If you need help running the project locally or want me to add usage examples (GIFs, workflow examples, or expanded MCP docs), tell me which area to expand.