Safeguard
Tag

javascript

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

93 articles

Open Source

@microsoft/fetch-event-source: Robust SSE Streams in the Browser

The fetch event source library fixes everything the native EventSource API refuses to do: POST bodies, auth headers, and retry logic you actually control.

Mar 30, 20267 min read
AppSec

URL Validation in JavaScript: Regex Patterns and Safer Options

URL validation regex in JavaScript is tempting but brittle. Here are patterns that work, the ones that cause ReDoS, and why the URL constructor is usually the better tool.

Mar 29, 20266 min read
Open Source

core-js 2.6.12: Vulnerabilities, EOL Status, and Upgrading to v3

Searching for core-js 2.6.12 vulnerabilities turns up no CVEs — the finding is the abandoned v2 line itself. What the deprecation actually means and how to migrate to core-js 3 cleanly.

Mar 29, 20266 min read
Open Source

@babel/plugin-transform-runtime: What It Does and When You Need It

The babel plugin transform runtime deduplicates Babel's injected helpers and keeps polyfills out of the global scope. Here is what it actually changes in your output, and when it earns its place.

Mar 26, 20266 min read
Open Source

Is the npm Luxon Package Safe to Use? A Security Review

The npm Luxon package is actively maintained and safe for current use, with one notable historical ReDoS advisory to be aware of. Here is the security picture.

Mar 24, 20265 min read
AppSec

DOM-Based XSS Attacks: How They Work and How to Prevent Them

A DOM based XSS attack executes entirely in the browser, which is why your server-side filters and access logs never see it. Here is how the source-to-sink flow works and what actually stops it.

Mar 24, 20267 min read
Open Source

core-js on npm: Security Review and Safe Usage

A security and sustainability review of core-js on npm: the postinstall history, the maintainer funding crisis, and how to keep this near-universal dependency safe.

Mar 22, 20266 min read
Security

JSON Patch Security: Prototype Pollution and Safe Usage

JSON Patch (RFC 6902) is a compact format for applying partial updates, but implementations like fast-json-patch have had prototype-pollution flaws. Here is how to use it safely.

Mar 21, 20265 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.

Mar 21, 20267 min read
Supply Chain Attacks

Ledger Connect Kit December 2023: A CDN Attack Retrospective

The Ledger Connect Kit compromise was a five-hour CDN attack that drained roughly $600k from connected wallets. A look at how it happened and what defenders learned.

Mar 12, 20265 min read
Open Source Security

JSR JavaScript Registry Security Model

JSR reimagines JavaScript package distribution with mandatory signing, scoped namespaces, and provenance by default. Here is how the security model works.

Mar 8, 20265 min read
Best Practices

How to Detect Malicious npm Packages: A Workflow

A practical detection workflow for malicious npm packages: install-time signals, registry heuristics, reachability checks, and CI gates that actually block attacks.

Mar 6, 20267 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.

javascript (Page 6) — Safeguard Blog