Build1 distinct publisher3 min readUpdated
A single-author npm tool measured what supply-chain guards actually verify, and found documented hallucinated names alive on the registry. Provenance beats resolution.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
The rule that catches the common case is not a distance measure at all. According to the author of vetdeps, the string `unused-imports` plus the ecosystem prefix `eslint-plugin-` resolves to a package with 7.8 million weekly downloads [7], which is exactly what a model emits when it drops the prefix. Levenshtein cannot see that: the two names sit fifteen edits apart [6]. To catch it on edit distance you would have to allow 15, seven and a half times the threshold of 2 that already misfired by calling `znv` a typo of `ajv` [15], two unrelated legitimate packages [8].
The rest of his measurement log is the useful part, because it is a record of rules that looked correct and were not. Affix rules that stripped a suffix flagged `chalk-cli` as `chalk`, a Sindre Sorhus package published in 2015, and flagged `vite-plugin-vue` as `vue` [10]. Those are not typosquats, they are how the ecosystem names things, and the fix was to allow rules that add an affix and never strip one [11].
Work the study numbers and you can see why pre-registration pays. Roughly 113,000 of the 576,000 sampled suggestions were names that did not exist [16], and if 43 per cent of those recur on identical prompts [4], then about one suggestion in twelve is a name an attacker can find by running the same prompt twice [17]. Registration costs nothing. The attacker does not need to guess what you will type; he needs to have already typed it.
Against that, the false-positive economics are brutal. `react-fetch-hook` reads like something a model made up and is seven years old with 15,000 weekly downloads [5]. Any heuristic keyed on novelty or odd-sounding names kills it, and a tool that flags a real dependency gets removed the same day. The author reports zero false positives on a real 550-package project [14]. That is one project, self-measured by the person shipping the tool, and nobody else has run it.
The distribution problem is the one most security tooling loses. Twelve packages already sit in this niche and the most successful has 202 weekly downloads [18], all of them scanners a human has to remember to invoke. So vetdeps puts itself in the path instead: a `preinstall` gate on every `npm install`, plus a Claude Code and Cursor hook that blocks the agent before the install runs [13]. That second one is the part that matters, since the thing typing the install command in 2026 is frequently not a person reading the name [12].
What such a gate can actually answer is a provenance question. `unused-imports` graduated from suspicious-sounding to confirmed malware under OSV advisory MAL-2025-48781 [9], `types-node` carries MAL-2024-12159 [c9b], and the tool's own sample finding is `@ctrl/[email protected]` against MAL-2025-47141 [19]. Those are lookups against advisory and reputation data, not against the registry's index. Resolution tells you an attacker did his job.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Three package names documented as AI hallucinations (react-codeshift, react-fetch-hook, unused-imports) all return HTTP 200 from the npm registry, so any guard built on an existence check reports them safe.
The technique of pre-registering package names that AI tools hallucinate is called slopsquatting.
react-fetch-hook sounds invented but is seven years old, has 15,000 weekly downloads, and is entirely legitimate; a rule of the form 'new or odd-sounding name equals bad' flags it.
unused-imports and eslint-plugin-unused-imports are fifteen edits apart, so typosquat checkers built on Levenshtein distance miss the case.
unused-imports plus the ecosystem prefix eslint-plugin- equals a package with 7.8 million weekly downloads; the working rule asks whether a candidate plus a known ecosystem prefix equals a popular package.
A fixed edit distance of 2 flagged znv as a typo of ajv, both real and legitimate; allowed distance now scales with name length, with names under 5 characters requiring an exact match.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Checkable specifics, one interested source
The mechanism claims are unusually concrete and independently checkable: named packages resolving on the npm registry, OSV advisory identifiers, download counts, and two documented false positives with the rule changes they forced. But the entire cluster is one post by the tool's author, the headline hallucination statistics are unattributed, and the central performance number is a single self-run measurement.
Launch artifact only
There is a runnable release with documented install gates and agent hooks, and real advisory activity in the surrounding ecosystem, but no install counts, deployments, or user reports for vetdeps itself. The only usage figure in the cluster is the 202 weekly download ceiling the author attributes to incumbent tools, which describes a niche with negligible traction.
Mildly overstated, partly self-corrected
The framing ('existence checks are dead', predictable-attack statistics) runs ahead of what one author's unreplicated measurement and an unnamed study can carry, and the launch is promotional. The gap stays modest because the post volunteers its own limits: metadata-only analysis, MAL- as the sole machine-readable malware signal, CVE scanning explicitly out of scope, Yarn Berry unsupported, and an invitation to file false positives as defects.
Author-promoted tool launch
The only source is a launch post written by the maintainer of the tool being recommended, ending in install commands. The narrative that existing approaches are dead and that incumbents peaked at 202 weekly downloads directly benefits the author's package, and no independent voice appears in the cluster.
Mechanism credible, magnitudes unverified
Confidence is moderate: the technical mechanism and rule-design lessons are internally consistent, specific, and cheap to verify against public registries and OSV, so the qualitative claim that existence checks are insufficient holds up. Confidence is held down by single-source coverage, an interested author, uncited prevalence statistics, and zero adoption evidence for the tool.
build
Claude Code's new default is a confession: the approval prompt was never a control1 distinct publisher
build
A hallucinated package name was already registered when the engineer went looking1 distinct publisher
product
Engineering counts merged pull requests and nothing for the hours spent watching the agent1 distinct publisher
build
Z.ai pays for ZCode users in tokens, not cash: 100 million each to 50,000 signups1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 22, 2026