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

@ariada-org/url-guard

v0.1.0

Published

Shared SSRF guard — reject non-http(s) schemes and resolve+validate hostnames against loopback/private/link-local/reserved ranges, returning a pinned IP so callers can close DNS-rebinding. Open source under EUPL-1.2.

Readme

@ariada-org/url-guard

Shared server-side request-forgery (SSRF) guard for every place the scanner fetches a user-supplied URL. It rejects non-http(s) schemes, resolves the hostname to all of its addresses, and refuses the request if any resolved address is loopback, private (RFC 1918), link-local, unique-local, carrier-grade NAT, or otherwise reserved — including the IPv4-mapped IPv6 form (::ffff:a.b.c.d) that a naive prefix check misses. It returns the validated address so the caller can pin the connection and close DNS-rebinding.

Install

pnpm add @ariada-org/url-guard

Usage

import { resolveAndGuard, guardRedirect } from '@ariada-org/url-guard';

const guarded = await resolveAndGuard(userUrl);
if (guarded.isErr()) {
  // guarded.error.kind: 'scheme_not_allowed' | 'private_literal'
  //   | 'private_resolved' | 'resolution_failed' | 'unparseable'
  throw new Error(`refused: ${guarded.error.kind}`);
}
// guarded.value.url          — the validated URL
// guarded.value.pinnedAddress — pin the socket to this IP before fetching

// On each redirect hop, re-check the Location header:
const next = await guardRedirect(locationHeader, currentUrl);

assertSafeUrl is the synchronous scheme + IP-literal check (no DNS); resolveAndGuard adds hostname resolution and returns the pinned address; guardRedirect resolves a relative Location against its base and re-guards it.

Options

  • allowPrivate — when true, private/loopback destinations are allowed (for a CLI --allow-private opt-in or local development). Defaults to false.

Ranges refused by default

10/8, 172.16/12, 192.168/16, 127/8, 169.254/16 (cloud metadata), 0.0.0.0/8, 100.64/10 (CGNAT), ::1, fc00::/7, fe80::/10, and any IPv4-mapped IPv6 whose embedded IPv4 falls in the above.

License

EUPL-1.2. Copyright Agonist Development AB. See LICENSE.