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

@mastertanzeel/safe-run

v1.0.0

Published

Run untrusted Node.js projects with safer defaults, transparent risk prompts, and sandboxed execution.

Downloads

10

Readme

safe-run

Run untrusted Node.js projects with safer defaults, transparent prompts, and sandboxed execution.

Why safe-run?

safe-run is built for developers who need to inspect and run unknown repositories without blindly executing dependency scripts.

It focuses on:

  • Zero-trust install flow
  • Explicit user consent for risky actions
  • Human-readable risk insights
  • Least-privilege Docker sandboxing

Install

npm i -g @mastertanzeel/safe-run

Or run directly:

npx @mastertanzeel/safe-run dev

Modes

1) Dev mode (default low-friction)

safe-run dev

What it does:

  • Runs npm install --ignore-scripts
  • Runs npm audit --json
  • Detects suspicious dependency install scripts
  • Prompts before running risky scripts (default: no)
  • Prompts before running your command (npm run dev by default)

2) Sandbox mode (Docker isolation)

safe-run sandbox

What it does:

  • Runs in Docker
  • Uses non-root user
  • Uses no-new-privileges
  • Drops Linux capabilities
  • Uses --network none by default

3) Freelance mode (high security)

safe-run freelance

What it does:

  • Safe install with scripts blocked
  • Strict script approvals (default deny)
  • Hardened Docker sandbox
  • Restricted environment passthrough (no secret env injection)

Prompt Example

⚠️ Package "xyz" wants to run install scripts.
This may be dangerous.
Allow execution? (yes/no, default: no)

Suspicious Script Detection

safe-run flags patterns such as:

  • curl or wget
  • Piping to shell (| bash, | sh)
  • Remote URL downloads
  • Base64 decode + execute patterns
  • eval / new Function

Optional External Scans

safe-run includes:

  • npm audit (MVP, built-in)
  • Optional OSV.dev query batch
  • Optional Socket.dev lookups (API key prompt with hidden input)

Security behavior:

  • API keys are prompted via hidden input
  • Keys are kept in-memory only
  • Keys are never logged or stored to disk

Network Monitoring (Best Effort)

Use --monitor-network in Docker modes to print basic socket activity from inside container.

safe-run sandbox --monitor-network

CLI Help

safe-run --help

Development

npm install
npm run lint
node index.js --help

Security Principles

  • Zero trust for external code
  • Explicit consent for risky actions
  • Least privilege by default
  • No hidden behavior

License

MIT