supply-chain-intake
An LLM generates a plausible-sounding package name token-by-token with no lookup against a real registry. ~19.7% of AI-recommended packages do not exist (576k-sample study); the same fake name recurs across runs, so attackers pre-register it as malware — "slopsquatting". The huggingface-cli proof-of-concept (an empty package matching a common hallucination) drew 30k+ downloads. Endor Labs: only ~1 in 5 AI-recommended dependency versions is both real and safe. A dependency the agent named is untrusted until verified — never install it just because the model produced the name.
When to use
- About to add a dependency to
package.json/requirements.txt/go.mod/Cargo.toml/composer.json/pyproject.toml, or runnpm/pnpm/yarn install,pip install,go get,cargo add,composer require. - Reviewing an AI-authored diff that touches a dependency manifest or lockfile.
- An install command was suggested (especially a
curl … | bashone-liner). - About to install or enable a host plugin, mod or third-party agent skill — a marketplace install, a hook bundle, a UI mod,
npx skills add <x>, a repository link with "install this", or a.skill/.ziparchive — § Host plugin / mod / skill intake. - About to add or connect an MCP server (an
npx/uvx-launched package or a remote endpoint) to the agent config (.mcp.json/ equivalent) — an MCP server is a dependency plus a tool-grant, so it runs the intake gate too. - A Dockerfile, base image or system package install (
apt,apk,brew) adds a file processor — an image converter, metadata reader, document converter or virus scanner. It parses attacker-supplied uploads, so it is a dependency with an attack surface even though no manifest names it. Check it as a class against the package's advisory database; never pin a version from memory.
Do NOT use when: no dependency, plugin, mod or foreign skill is being added and no manifest/lockfile is touched. Writing a new skill of your own → skill-writing.
The Iron Law
VERIFY THE PACKAGE EXISTS ON THE REAL REGISTRY BEFORE YOU INSTALL IT.
A NAME THE MODEL PRODUCED IS A HYPOTHESIS, NOT A DEPENDENCY.
PIN IT, LOCK IT, CVE-SCAN IT. NEVER PIPE A REMOTE SCRIPT STRAIGHT TO A SHELL.
Procedure — intake gate (run in order before adding a dependency)
- Do you need a dependency at all? The cheapest supply-chain risk is the
one never taken. Walk the rungs above "installed dependency" first — is it
already in the tree (npm ls <pkg>, composer show, pip list), does the
stdlib or framework carry it, does the platform already do it
(crypto.randomUUID before a uuid package, Intl before a formatting
library, AbortSignal.timeout before a timeout helper, the database's own
full-text / JSON support before an application-side index)? Full ordering: