Your Tools are Hiding npm Audits from You

Zach Leatherman · 2026年11月24日

AI 摘要 AI 生成,可能有误

本文认为,npm audit 的结果可能具有误导性,因为像 Next.js 这样的工具会在标准审计机制之外捆绑自身的 139 个依赖项,从而隐藏了 3 个严重漏洞——这些隐藏的严重漏洞数量比已停止维护的 Gatsby 中可见的严重漏洞还要多。类似的捆绑依赖项或抑制审计输出的做法也存在于 Vite、各种 create- 开头的命令行工具,以及 pnpm 和 yarn 等包管理器中,这削弱了安全审计的透明度。作者构建了原型污染报告(Prototype Pollution Report),这是一个每日更新的框架生态漏洞数量对比,旨在规范化这些差异并提供更清晰的安全洞察。

Meaningful Audits are Important

Look at these two npm audit outputs generated this morning and tell me which project is more secure:

Which project is more secure? The one with 0 vulnerabilities, right? Not necessarily!

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Zach Leatherman

All of my 300+ browser tabs are beautiful

AI 摘要The article introduces a Firefox addon the author built to manage their habit of hoarding 300+ browser tabs. The addon provides features such as sorting tabs by recency, detecting duplicates, searching/filtering by title or URL, full undo/redo support, and a 'Saved' section for storing tabs to restore later. It also supports multi-account containers, identifies tabs playing audio, shows stale tabs, offers light and dark modes, and can merge all tabs into a single window.

“AI, make the website good”

AI 摘要The author reflects skeptically on the current AI-driven wave of development tooling—agents that plan, write, review, and orchestrate code—questioning whether these developer-experience improvements actually translate into better software for real users, just as similar promises around client-side rendering and the single-page-application era failed to do. Citing anecdotal declines in software reliability and poor performance/accessibility scores among AI-related sites, the author suspects this cycle repeats the old playbook at an accelerated pace. They conclude that craft, defined as caring about the quality of output regardless of the tools used to produce it, is more important than ever.

Icon Fall Web Component

AI 摘要The author introduces , a web component that makes icons (including emoji) fall across a website, created as a follow-up to . Originally built as an easter egg for Blog Awesome, it is now publicly available on GitHub and installable via npm. It offers configuration options for the icon count and a customizable, comma-separated list of colors.

Table of Contents Web Component

AI 摘要The article introduces a zero-CSS table of contents web component that can either progressively enhance server-rendered or hierarchies or client-render them, highlighting which headings are currently visible in the viewport. Extracted from the WebC Tugboat starter project for standalone use, it is available on npm as @zachleat/table-of-contents, with demos shown on the author's blog and Blog Awesome. Developers can configure a selector attribute to control the heading search scope, defaulting to main :is(h2, h3, h4, h5, h6).

Solar Eclipse Toggle Web Component (two state dark/light mode toggle)

AI 摘要The author turned their two-state dark/light mode toggle experiment into a reusable web component called @zachleat/solar-eclipse-toggle, incorporating accessibility feedback from Curtis Wilcox, and released it on GitHub and npm. The component's highlights include an inert button before JavaScript loads, no cumulative layout shift (CLS), continued functionality when CSS fails to load, and internationalization support via strings inserted from light DOM.