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

ghostnode

v0.6.0

Published

Privacy firewall for Node.js apps that detects, redacts, or blocks sensitive data before it leaves your process.

Downloads

1,201

Readme

ghostnode

Built by DARKSOL

ghostnode is a privacy firewall for Node.js apps.

It inspects outbound boundaries and helps you detect, redact, or block sensitive data before it leaves your process.

Think:

  • HTTP requests
  • logs
  • analytics and telemetry payloads
  • AI and agent calls
  • debug output

Install

npm install ghostnode

Quick Start

import { installGhostNode } from "ghostnode";

installGhostNode({
  mode: "audit",
  includePreview: true,
  onEvent(event) {
    console.error("GhostNode detected a potential data leak", event);
  }
});

You can also preload it automatically:

GHOSTNODE=audit node app.js

Or scan an app from the outside:

npx ghostnode scan -- node server.js

Or emit a machine-readable report:

npx ghostnode scan --mode audit --report ghostnode-report.json -- node server.js

Modes

  • audit: detect and report leaks, but allow the original operation
  • redact: sanitize detected data, then allow the original operation
  • block: stop the operation when a leak is detected

Boundaries

GhostNode currently covers:

  • fetch
  • console
  • generic logger objects
  • pino through createPinoLogger(...)
  • winston through createWinstonLogger(...)

Logger Adapters

import { createPinoLogger, createWinstonLogger } from "ghostnode";

const safePino = createPinoLogger(pinoLogger, { mode: "redact" });
const safeWinston = createWinstonLogger(winstonLogger, { mode: "audit" });

HTTP Helpers

import { createFetchProxy, sanitizeRequest } from "ghostnode";

const safeFetch = createFetchProxy({
  mode: "redact",
  onRequest(request) {
    console.log("outbound request", request);
  }
});

const sanitized = sanitizeRequest("https://[email protected]", {
  headers: {
    authorization: "Bearer token-value"
  }
});

What It Detects

Built-in detectors cover:

  • emails
  • IP addresses
  • bearer tokens
  • API keys
  • JWTs
  • cookies
  • passwords
  • payment-card-like values

You can also add custom secrets and custom sensitive-key rules.

Structured Events

Every detection can emit a structured event with:

  • boundary
  • destination
  • findings
  • severity
  • action
  • optional sanitized preview data when includePreview: true

That gives you something useful for logging, tests, CI, and incident review instead of a vague boolean.

Scan Reports

ghostnode scan can write JSON output with severity counts and full event detail:

npx ghostnode scan --mode audit --report ghostnode-report.json -- node app.js

Promise

The promise stays simple:

GhostNode detects sensitive data leaving your Node.js application.

Translation Note

Translations are welcome.

The main README stays compact in English, and full translations live under docs/i18n/.

Direction

Strong next expansions:

  • source-aware leak tracing
  • telemetry and error-reporter integrations
  • richer policy controls and severity thresholds
  • more first-class outbound adapters

GhostNode Your data was never there.