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

distguard

v0.1.3

Published

Security gate for your build output — find leaked credentials and exposed source maps in dist before you ship.

Readme

distguard

test npm license

Security gate for your build output. Find leaked credentials and exposed source maps in dist/ before you ship — not after someone else finds them.

Your SPA ships every byte of JavaScript to every visitor. Whatever secrets sit in your source end up in the bundle — a scan of 5 million apps found 42k+ leaked tokens. distguard is the pre-flight check that stops them at build time.

npx distguard ./dist                 # risk-ranked terminal report
npx distguard ./dist --json          # machine-readable for CI
npx distguard ./dist --fail-on high  # red-light the pipeline on high+ findings

What it detects

26 rules across three severity tiers — full catalog with remediation guidance in RULES.md:

| tier | examples | | --- | --- | | critical | AWS / Alibaba Cloud access keys · Azure storage account keys · Stripe live secret keys · private key blocks · GitHub / npm / GitLab / GCP-OAuth tokens | | high | Google / OpenAI / Anthropic API keys · Slack / Telegram / Discord tokens · SendGrid / Twilio / Shopify / DigitalOcean credentials · inline basic-auth URLs | | medium / low | hardcoded JWTs · Hugging Face tokens · Firebase database URLs · internal network addresses · restorable & bare source maps |

Every finding is redacted, anchored to file:line:column with a masked code frame, and explained: why it's dangerous → how to fix it → authoritative reference.

Why distguard

  • ** CI-first**: meaningful exit codes (0 clean · 1 findings ≥ threshold · 2 runtime error) and JSON output make it a drop-in pipeline gate
  • low noise by design: vendor documentation samples are whitelisted, formats strictly validated, duplicates collapsed per file
  • zero-dependency mindset: a single tiny runtime dep (arg parser); a security tool should not widen your attack surface to audit you
  • framework agnostic: scans whatever folder you point it at

How it compares

| tool | lane | notes | | --- | --- | --- | | gitleaks | git repositories (source) | complementary — run both | | trufflehog | git history / many sources | same lane as gitleaks | | mapxtractor | offensive recon (hunters) | extracts, doesn't gate builds | | Jsmon | commercial SaaS monitoring | paid, closed | | distguard | built artifacts, free, CI gate | this gap |

Configure

Drop a .distguardrc.json next to where you run it:

{
  "allowlist": ["vendor/", "test/fixtures/"],
  "ignoreRules": ["internal-network-url"]
}

Roadmap

SRI integrity checks · security header audit · SARIF output for GitHub Code Scanning · CSP generation from build output.

Development

pnpm install
pnpm test          # vitest suite
pnpm lint          # oxlint + oxfmt
pnpm rules:doc     # regenerate RULES.md from rule metadata
pnpm build         # tsdown

Fixture policy: credential values in tests are assembled at runtime from fragments so this repository never contains byte-level lookalike secrets.

MIT © lvyanyan