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 investigation

Fictional, 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-helper

Version 1.0.0 / Fictional record

Follow the evidence

0 of 4 records collected

Your next check

Which clue would you trust first?

Choose a source. Each record answers a different question. You can inspect them in any order.

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.

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.

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.

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.

  1. Treat an AI-suggested package name as unverified input.
  2. Follow official project documentation to the exact registry and package name.
  3. Compare spelling, publisher and release history. Existence and popularity are not safety proofs.
  4. Match version-specific provenance to the expected repository, commit and build workflow. Origin is not safe behavior.
  5. Review the exact release, dependency changes and permissions using your project’s review process. Do not install an unknown package merely to inspect it.
  6. Keep unresolved questions. Decline or seek a reviewed alternative if evidence is insufficient.