← All Labs
🛡 AI HACKING BEGINNER +75 XP · +30 no-hint bonus 🎯 Practice mode

Check Before You Install — Vet the AI's Dependency List

You asked an AI coding assistant to set up a small web API. It replied with one install command listing seven packages. Before you run it, you looked each one up on the package registry. Three of them should not be installed as suggested.

https://bookshop.local/search

What is AI supply chain risk in dependencies?

Coding assistants suggest dependencies with the same confidence whether the package is famous, misspelled or imaginary. Installing a package runs its code on your machine, so a wrong suggestion is a direct route in.

Attackers plan for this. They register names that assistants tend to invent, publish lookalikes of popular packages, and offer convenient forks.

A real case

We have not found a public incident from 2025 or 2026 that matches this technique closely enough to cite, so we are not listing one here.

How to fix it

  • Look up every suggested package on the official registry before installing.
  • Check age, download counts, maintainers and the linked source repository.
  • Pin versions and commit a lockfile so installs are repeatable.
  • Install from the official registry, not from forks or raw repository URLs, unless you have reviewed the code.

Questions people ask

What is slopsquatting?

Registering a package name that AI assistants are known to invent, so that developers who trust the suggestion install the attacker's code.

Is a package with few downloads always malicious?

No, but together with a lookalike name and a very recent publish date it is a strong reason to stop and check.

Read the full OWASP LLM Top 10 guide · All free labs · AI red team certification