Change the wording, keep your experiment. Saved in this browser when storage is available.
The package investigation / About 5 minutes
AI gave you a name.
Should you trust it?
Open the evidence. Spot the switch. Leave with a way to check the next package an AI suggests.
Open the investigationFictional, inert investigation. These are authored examples, not live AI output. Nothing is installed, downloaded from a registry or executed. All package names, publishers and records are fictional.
Case 1 / Fictional investigation
The name that appeared overnight
Yesterday this name had no registry entry. Today it does. What changed?
The task
I want to turn a folder of pictures into a contact sheet.
Authored recommendation example
Use crane-pixel-helper. It handles the layout for you.
crane-pixel-helperVersion 1.0.0 / Fictional record
Follow the evidence
0 of 4 records collectedYour next check
Which clue would you trust first?
Choose a source. Each record answers a different question. You can inspect them in any order.
- Day 1 AI suggests a name.
No entry exists. - Day 2 A publisher registers it.
The origin is still unverified.
All records are authored fiction.
You decide what happens next
What does your evidence support?
No “safe to install” button. A good investigation can end with a useful unanswered question.
Your decision is still open
Pick a next step above. You can revise it when new evidence changes your mind.
What this reveals:
Each case keeps its notes while this page is open. Download them before leaving.
Choose a record to start.
Read or copy my field notes
Your collected evidence will appear here. The checklist below is always available.
The mechanism
What is slopsquatting?
An AI can suggest a package name it made up. Someone could later publish code using that name. The name now exists, but that does not make the AI’s suggestion trustworthy. A lookalike spelling is a different trick: it copies the name of an existing package.A coding model can invent a plausible package name. Someone can then publish a package under that name, so a later user follows the suggestion to code the model never verified. This is different from a lookalike name that imitates an existing package.
Research documents package hallucinations under specific model and task conditions. This lesson does not estimate the chance that your current assistant will make this mistake. Read the USENIX 2025 research.
The important limit
A badge answers a narrower question.
A record can help show who published code and where it came from. It cannot prove that the code is harmless. First check that it is even the project you meant to use.Provenance can connect an artifact to a publisher, source and build. It cannot establish that the source is harmless. A valid record for the wrong project is still the wrong project.
Compare npm’s provenance guide and PyPI’s attestation security model. For the separate name-confusion problem, see npm’s threat overview.
Use it outside this lesson
Before you trust a package name
These checks reduce uncertainty. They do not guarantee safety.
- Treat an AI-suggested package name as unverified input.
- Follow official project documentation to the exact registry and package name.
- Compare spelling, publisher and release history. Existence and popularity are not safety proofs.
- Match version-specific provenance to the expected repository, commit and build workflow. Origin is not safe behavior.
- Review the exact release, dependency changes and permissions using your project’s review process. Do not install an unknown package merely to inspect it.
- Keep unresolved questions. Decline or seek a reviewed alternative if evidence is insufficient.