Safeguard
Tag

npm

Safeguard articles tagged "npm" — guides, analysis, and best practices for software supply chain and application security.

186 articles

Open Source

rrule npm Package: Recurrence Rules, Health, and Pitfalls

The rrule npm package is the standard way to handle iCalendar recurrence rules in JavaScript — but it carries timezone traps, unbounded-expansion hazards, and a slow maintenance pulse worth knowing before you depend on it.

Feb 11, 20257 min read
Open Source

npm handlebars: A Security Review and Safe Usage Guide

The npm handlebars package is a widely used templating engine with a history of prototype pollution issues. Here is what to know before you depend on it and how to use it safely.

Feb 11, 20256 min read
Supply Chain

cross-env and the crossenv Typosquat: A Supply Chain Case Study

In 2017, a malicious crossenv package on npm stole environment variables from developers who mistyped cross-env. The incident is still the cleanest case study in typosquatting we have.

Jan 28, 20257 min read
Supply Chain

node-pre-gyp and node-gyp: The Security Cost of Native Modules

@mapbox/node-pre-gyp downloads compiled binaries into your node_modules at install time. Understanding that machinery is the difference between a fast install and an unauditable one.

Jan 28, 20257 min read
Open Source

npm uninstall package: How to Safely Remove Dependencies

How the npm uninstall package command works, what it leaves behind, and how to confirm a removed dependency is actually gone from your tree and your risk surface.

Jan 28, 20256 min read
Open Source

minimatch npm: Security Review and Safe Usage

The minimatch npm package powers glob matching across the JavaScript ecosystem, and a ReDoS flaw made older versions a denial-of-service risk. Here is what to know and how to stay safe.

Jan 28, 20255 min read
AppSec

The xss npm Package: Sanitizing HTML Input Correctly

The xss npm package is a whitelist-based HTML sanitizer for Node and the browser. It works well — when you sanitize in the right place, with the right whitelist, for the right output context.

Jan 27, 20257 min read
Concepts

What is a Package Registry Mirror

A package registry mirror is a local copy or caching proxy of a public registry. It keeps builds running when npm is down — and controls what enters your supply chain.

Dec 17, 20246 min read
Concepts

What is Dependency Pinning

Dependency pinning locks every package in your build to an exact, verified version so the code you tested is the code you ship. Here's how to do it per ecosystem.

Oct 8, 20246 min read
Licensing

Node.js License: What Actually Applies to Your App

Node.js itself ships under a permissive MIT-style license, but your app's real license exposure comes from the hundreds of npm packages riding along with it.

Sep 11, 20244 min read
Open Source Security

npm Package Takeover: The Summer 2024 Wave

Between May and June 2024 at least 36 npm packages were hijacked via expired maintainer domains and leaked tokens. We map the cluster.

Jun 20, 20245 min read
Vulnerabilities

CVE-2022-24785: The Moment.js Path Traversal, Explained

A user-controlled locale string was all it took: how CVE-2022-24785 let attackers traverse paths through Moment.js locale loading on Node.js, and why the fix is a one-line upgrade.

May 21, 20245 min read

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.

npm (Page 13) — Safeguard Blog