The supplier who doesn’t exist
Watch it happen
The AI assistant lists a supplier that does not exist. Mallory registers that name, and Alice’s install delivers Mallory’s parcel to the back office.
Alice is building the bank’s new system with the AI assistant. She asks it to write the code and say which outside suppliers (packages) to order.
Alice says: Build me a file importer.In bank terms and app terms
| In the bank | In your app |
|---|---|
Are you exposed?
You paste install commands from an AI answer without looking the package up. Nobody on the team checks a package’s publisher, age or repository before adding it. Installs run without a lockfile, or anyone can add a new dependency with no review.
Before installing anything the AI suggests, look it up on the registry: does it exist, who publishes it, how old is it, how many downloads (a low count is a warning sign, but a high one is not proof of safety), and does its repository really contain the same code. Commit your lockfile and install from it ( npm ci; for pip, pin exact versions with hashes and use--require-hashes).Cut down install-time code: consider npm install --ignore-scriptswhen installing code you haven’t vetted (it applies to the whole install and can break packages that need a build step, and it does not stop a package’s code running once you import it), and use a private registry or allow-list so only approved names can be installed.
Ask your AI tool to fix it
Paste this into Cursor, Claude, Lovable, Bolt or whatever you build with.
List every dependency in this project (package.json, requirements.txt and any lockfiles). For each one that I did not clearly choose myself, tell me what it does, who publishes it, and the link to its repository so I can check it is real and matches. Flag any that look very new, rarely used, or have no matching repository. Make sure a lockfile with pinned versions is committed, and do not add any new package without telling me its exact name and why it is needed. Only state facts you can see in the registry metadata or lockfile; say “unknown” otherwise.Where this comes from
The facts, figures and fixes on this page were checked against these sources on 25 Oct 2026. They are linked so you can check for yourself.
- AI Package HallucinationsLasso SecurityEmpty huggingface-cli upload got more than 30k downloads in three months
- We Have a Package for You! Package Hallucinations by Code Generating LLMsUSENIX Security 2025Package hallucinations by code-generating LLMs are a software supply-chain threat
- LLMs can't stop making up software dependenciesThe RegisterSeth Larson coined slopsquatting; advice to double-check LLM output
- package-lock.jsonnpm DocsLockfile records exact dependencies, has integrity hashes, should be committed
- npm cinpm Docsnpm ci installs strictly from the lockfile and errors if it does not match
- npm config: ignore-scriptsnpm Docsignore-scripts stops npm running package.json scripts; default is false
- Secure installs (hash-checking mode)pip documentation--require-hashes needs pinned requirements with hashes; blocks tampering
Spot a mistake or something out of date? Report a correction · How these guides are made and checked
The free, open-source scanner checks for most of the problems in these guides.