Securing npm is table stakes (Interview)
Episode
81 min
Read time
3 min
Topics
Startups, Design & UX, Sales & Revenue
AI-Generated Summary
Key Takeaways
- ✓Pre/Post-Install Script Vulnerability: Malicious actors compromise NPM packages by adding pre-install or post-install scripts that execute immediately upon download, running tools like TruffleHog to steal secrets and credentials from developer machines. These scripts were originally designed for compiling native C++ modules but now represent the primary attack vector. Forcing a major version bump (not minor/patch) when scripts are added would prevent automatic installation and slow attackers significantly.
- ✓Trusted Publishing Limitations: GitHub's OpenID Connect trusted publishing generates one-time tokens during workflow execution, eliminating stored credentials. However, it lacks two-factor authentication, prompting the OpenJS Foundation to recommend against using it for critical packages. If attackers gain GitHub repository access, they can publish packages undetected. The system also locks maintainers into GitHub/GitLab platforms, excluding companies using private internal repositories for publishing.
- ✓Token Rotation Burden: GitHub's shift to fine-grained tokens with 90-day expiration dates places significant operational burden on maintainers managing hundreds of packages. No batch operation tools existed at launch, requiring individual package updates with multiple two-factor authentication approvals. This approach pushes security responsibility onto maintainers rather than implementing platform-level protections like credit card companies use with anomaly detection and fraud monitoring systems.
- ✓Registry Scale Economics: NPM processes over 200 million downloads monthly for packages like ESLint alone, creating massive bandwidth costs that make registries unprofitable. NPM Inc. sold because they couldn't afford operations. JSR from Deno started strong with security-first design but faded as the startup needed revenue. Python's PyPI survives through foundation donations from Google, AWS, and Fastly providing $10,000 monthly hosting, but NPM's scale exceeds this model.
- ✓JSR Compatibility Failures: JSR implemented strong security including no pre/post-install scripts, reserved namespace protection requiring verification, and trusted publishing from launch. However, mixing JSR packages with NPM packages in publishable projects doesn't work. ESLint developers attempted using JSR standard library packages but had to copy source code directly into their repository instead. JSR only functions for applications, not for packages being published back to NPM.
What It Covers
Nicholas Zakas, creator of ESLint, critiques GitHub's insufficient response to NPM security breaches. In September 2025 alone, 500 packages were compromised through credential theft and malicious pre/post-install scripts. He proposes specific solutions including anomaly detection, forced major version bumps for script additions, and questions whether alternatives like JSR or Volt can compete with NPM's massive scale and inertia.
Key Questions Answered
- •Pre/Post-Install Script Vulnerability: Malicious actors compromise NPM packages by adding pre-install or post-install scripts that execute immediately upon download, running tools like TruffleHog to steal secrets and credentials from developer machines. These scripts were originally designed for compiling native C++ modules but now represent the primary attack vector. Forcing a major version bump (not minor/patch) when scripts are added would prevent automatic installation and slow attackers significantly.
- •Trusted Publishing Limitations: GitHub's OpenID Connect trusted publishing generates one-time tokens during workflow execution, eliminating stored credentials. However, it lacks two-factor authentication, prompting the OpenJS Foundation to recommend against using it for critical packages. If attackers gain GitHub repository access, they can publish packages undetected. The system also locks maintainers into GitHub/GitLab platforms, excluding companies using private internal repositories for publishing.
- •Token Rotation Burden: GitHub's shift to fine-grained tokens with 90-day expiration dates places significant operational burden on maintainers managing hundreds of packages. No batch operation tools existed at launch, requiring individual package updates with multiple two-factor authentication approvals. This approach pushes security responsibility onto maintainers rather than implementing platform-level protections like credit card companies use with anomaly detection and fraud monitoring systems.
- •Registry Scale Economics: NPM processes over 200 million downloads monthly for packages like ESLint alone, creating massive bandwidth costs that make registries unprofitable. NPM Inc. sold because they couldn't afford operations. JSR from Deno started strong with security-first design but faded as the startup needed revenue. Python's PyPI survives through foundation donations from Google, AWS, and Fastly providing $10,000 monthly hosting, but NPM's scale exceeds this model.
- •JSR Compatibility Failures: JSR implemented strong security including no pre/post-install scripts, reserved namespace protection requiring verification, and trusted publishing from launch. However, mixing JSR packages with NPM packages in publishable projects doesn't work. ESLint developers attempted using JSR standard library packages but had to copy source code directly into their repository instead. JSR only functions for applications, not for packages being published back to NPM.
- •Credit Card Fraud Model: NPM should implement transaction-level anomaly detection like credit card companies, analyzing each package publish for unusual patterns before distribution occurs. Credit cards use CVC codes, chips, and PINs (consumer protection) plus real-time fraud detection (platform protection). GitHub has capability to analyze packages during upload but only applies it reactively after identifying attack patterns, not proactively preventing initial distribution to millions of CI systems and developer machines.
Notable Moment
Zakas reveals ESLint regularly receives mysterious pull requests attempting to change dependencies with no explanation, which he interprets as penetration tests. When maintainers ask for clarification, submitters never respond. With 200 million monthly downloads, attackers appear to be testing how easily they could inject malicious code into a package that would immediately propagate to countless CI systems and developer laptops worldwide.
Episode Transcript
Welcome, friends. I'm Jared, and you are listening to the change log, where each week, we interview the hackers, the leaders, and the innovators of the software world. As the creator and longtime maintainer of ESLint, Nicholas Zakas is well positioned to criticize GitHub's recent response to NPMs and security. He found their response insufficient and has other ideas on how GitHub could secure NPM better. On this episode, Nicholas details his ideas, paints a bleak picture of NPM alternatives like JSR, and shares our frustration that such a critical piece of Internet infrastructure feels neglected. But first, a big thank you to our partners at fly.io, the platform for devs who just wanna ship. Build fast, run any code fearlessly at fly.io. Okay. Nicholas Zakas talking to MPM on the change log. Let's do it. This is the year we almost break the database. Let me explain. Where do agents actually store their stuff? They've got vectors, relational data, conversational history, embeddings, and they're hammering the database at speeds that humans just never have done before. And most teams are duct taping together a Postgres instance, a vector database, maybe Elasticsearch for search. It's a mess. Well, our friends at Tiger Data looked at this and said, what if the database just understood agents? That's agentic Postgres. It's Postgres built specifically for AI agents, and it combines three things that usually require three separate systems. Native model context protocol servers, MCP, hybrid search, and zero copy forks. The MCP integration is the clever bit your agents can actually talk directly to the database. They can query data, introspect schemas, execute SQL Without you writing fragile glue code, the database essentially becomes a tool your agent can wield safely. Then there's hybrid search. Tagger data merges vector similarity search with good old keyword search into a SQL query. No separate vector database, no elastic search cluster, semantic and keyword search in one transaction. One engine. Okay. My favorite feature, the forks. Agents can spawn subsecond zero copy database clones for isolated testing. This is not a database they can destroy. It's a fork. It's a copy off of your main production database if you so choose. We're talking a one terabyte database forked in under one second. Your agent can run destructive experiments in a sandbox without touching production, and you only pay for the data that actually changes. That's how Copy On Right works. All your agent data, vectors, relational tables, time series metrics, conversational history lives in one queryable engine. It's the elegant simplification that makes you wonder why we've been doing it the hard way for so long. So if you're building with AI agents and you're tired of managing a zoo of data systems, check out our friends at Tiger Data at tigerdata.com. They've got a free trial and a CLI with an MCP server you can download to start experimenting right now. Again, tigerdata.com. Well, friends, we're here with our new friend and good friend, …
Get the full transcript (12,517 words) + summary by email — free
One-time email with the complete transcript and AI summary of this episode. No account needed.
One email, no spam. We’ll also show you what SignalCast does.
You just read a 3-minute summary of a 78-minute episode.
Get The Changelog summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from The Changelog
Forking Cal.com to closed source (Interview)
Sep 3 · 114 min
Latent Space
Simulation: the new Scaling Law — Joon Sung Park, Simile AI
Aug 21
More from The Changelog
Postgres at PlanetScale (Interview)
Aug 25 · 102 min
Software Engineering Daily
Biome and the Future of JavaScript Tooling
Jun 18
Books, tools, and gear mentioned in this episode
SignalCast may earn commission on purchases via these links.
Tools
by Deno
“JSR from Deno started strong with security-first design but faded as the startup needed revenue.”
“Sponsors section lists Tigerbeetle/Tigerdata as a sponsor of the episode.”
“Malicious actors compromise NPM packages by adding pre-install or post-install scripts that execute immediately upon download, running tools like TruffleHog to steal secrets and credentials from developer machines.”
“Sponsors section lists Fly.io as a sponsor of the episode.”
- ESLintBy guest
by Nicholas Zakas
“Nicholas Zakas, creator of ESLint, critiques GitHub's insufficient response to NPM security breaches.”
“Python's PyPI survives through foundation donations from Google, AWS, and Fastly providing $10,000 monthly hosting, but NPM's scale exceeds this model.”
“Sponsors section lists Namespace as a sponsor of the episode.”
company
“Sponsors section lists Squarespace as a sponsor of the episode.”
More from The Changelog
We summarize every new episode. Want them in your inbox?
Forking Cal.com to closed source (Interview)
Postgres at PlanetScale (Interview)
Canary tokens and digital tripwires (Interview)
From open source hits to OpenAI (Interview)
MCP on Code Mode (Interview)
Similar Episodes
Related episodes from other podcasts
Latent Space
Aug 21
Simulation: the new Scaling Law — Joon Sung Park, Simile AI
Software Engineering Daily
Jun 18
Biome and the Future of JavaScript Tooling
The Vergecast
Jun 15
# The **epic** story of Markdown
The Startup Ideas Podcast
Mar 26
I Built an AI Agent Company (From Scratch)
This Week in Startups
Mar 3
How the OpenClaw foundation bullet-proofed its future (w/Dave Morin) | E2257
Explore Related Topics
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
Read this week's Startups & Product Podcast Insights — cross-podcast analysis updated weekly.
You're clearly into The Changelog.
Every Monday, we deliver AI summaries of the latest episodes from The Changelog and 192+ other podcasts. Free for one show.
Start My Monday DigestNo credit card · Unsubscribe anytime