Slopsquatting Lab: Stop AI-Suggested Fake Packages
This is a hands-on lab for reviewing the packages an AI coding assistant suggests, before they reach your build. A made-up name that someone has registered runs like any other dependency. You review a fictional pull request and MCP manifest, make 12 scored calls and see which source backs each answer.
The scenario is fictional, with invented package names. The rules come from research (abstract level), OWASP and registry and standards documentation, listed below. To scan a real project, use the AI Dependency Scanner, the Package Scanner or the npm Scanner.
You are Priya Raman, application security lead at Northwind Logistics. An AI coding assistant, Atlas, opens pull requests and drafts MCP server manifests for your teams. Today it proposes dependencies, and some of them may not be what they seem: a package name the model made up that someone has since registered, a near-miss of a real name, a public package that shadows a private one. Over 12 scored decisions you choose how to verify, pin, scope, gate and respond. Every package, company and person is invented (names like acme-fastparse-utils). Each call scores 0 to 10 with the source behind the feedback.
Make it yours
Replace the sample names so the scenario and the debrief you export are about your organisation.
TL;DRWhat this is
5 points
- A scenario lab about "slopsquatting": an AI coding assistant recommends a package that does not exist, and someone registers that name so the next developer or agent who installs it runs their code. You act as application security lead at a fictional company and review a fictional AI-generated pull request and MCP server manifest.
- You make 12 scored decisions: checking that a name exists and who is behind it, near-miss (typosquat) names, lockfiles, exact pins and hashes, private names that a public package can shadow (dependency confusion), install-time scripts, an approved list with a fast lane, what provenance proves, MCP manifests, what a reviewer sees, how far to trust a Scorecard result, what to do after a bad install, and what to tell leadership.
- It draws on the abstract of Spracklen et al.'s package-hallucination study (arXiv 2406.10279, abstract level only), OWASP LLM03 Supply Chain and LLM09 Misinformation, npm, PyPI and pip documentation, NIST SP 800-218 (SSDF), SLSA and OpenSSF Scorecard.
- Free to play, no account needed. Every package, company and person is invented. No real malicious package name or attack steps appear.
- Defensive and educational only.
How this differs from our other agent labs
The Poisoned Dependency Lab is an incident: a package you already trusted ships a bad update, and you respond. This lab is the step before: should this name be added at all? The suggestion comes from an AI assistant, so the package may never have existed until an attacker registered it, may be a near-miss of a real name, or may shadow a private one. Only the last two steps cover response, and the first of them starts from not knowing whether anything ran.
Other supply-chain pages look at neighbouring questions: the Agent Plugin Supply Chain Lab covers plugins and skills an agent loads, the AI CLI Supply Chain Lab covers the AI command-line tools themselves, and the MCP Malicious Scan checks a server you have. After a bad install, plan the order of rotation with the Secret Rotation Order Planner.
Frequently asked questions
What is slopsquatting?
It is a name for a supply-chain trick built on package hallucination: a code-generating model suggests a package that does not exist, an attacker registers that name, and anyone who installs what the model suggested gets the attacker's package. OWASP LLM09 describes the same pattern: attackers experiment with coding assistants to find commonly hallucinated package names and publish malicious packages under them. "Slopsquatting" is community shorthand, not a term from a standard.
How common are hallucinated packages?
Spracklen and colleagues generated 576,000 code samples in two programming languages with 16 models and two prompt datasets. Their abstract reports hallucination rates of at least 5.2% for commercial models and 21.7% for open-source models, and 205,474 unique hallucinated package names. Those are the authors' figures from the abstract; we did not read the full paper, and results depend on model, prompt and settings.
How is this different from the Poisoned Dependency Lab?
The Poisoned Dependency Lab starts after a known, previously legitimate package ships a bad update, and asks how to respond. This lab is about the choice to add a package in the first place: a name that never existed until someone registered it, a near-miss of a real name, or a public name that shadows a private one, with an AI assistant as the source of the suggestion. It ends with a response step for a bad install, but the focus is prevention at the pull request.
Does checking that a package exists solve it?
No. The attack depends on the name existing, because the attacker registered it. Check who published it, when, its history, whether it links a real source repository and whether it matches what was meant. OWASP LLM09 does not say "check the package exists"; its mitigations are secure coding practices, automatic validation of outputs, cross-verification against trusted sources and human oversight.
What do npm and PyPI provide against fake or hijacked packages?
npm can publish provenance: attestations that link a package to its source and build and record who published it, signed through Sigstore. The npm documentation says provenance does not prove a package is free of malicious code. PyPI trusted publishing lets CI systems publish with short-lived OpenID Connect tokens instead of long-lived API tokens. Both help a consumer judge origin; neither proves a package is benign. npm's naming guidelines ask that unscoped names not be similar to another package, but the page does not mention typosquatting.
What is dependency confusion?
It is when a build that should fetch a private package resolves the same name from a public registry, where someone else owns it. Scoped names mapped to a private registry in the install configuration are one defence (npm documents linking a scope to a registry). Python tools handle indexes differently, so check your installer's documentation.
Should we turn off install scripts?
For installs started by an AI assistant or by CI, disabling them by default is a sound starting point: the npm config page says that with ignore-scripts set to true npm does not run scripts in package.json files, though a command that runs a specific script still runs it. It does not make a package safe, because its code can still run when imported.
Do SLSA and the SSDF stop this?
They help but do not solve it. The SLSA specification overview says the SLSA level of an artifact is independent of the level of its dependencies and that SLSA does not address organisations that intentionally produce malicious software. NIST SP 800-218 (SSDF 1.1) groups practices into Prepare the Organization, Protect the Software, Produce Well-Secured Software and Respond to Vulnerabilities, and its PS.3.2 covers collecting and sharing provenance data for software components.
Is the scenario based on a real incident?
No. The organisation, assistant and packages are invented, and we use obviously fictional names so none can match a real package. The research and standards cited are real and listed below.
How is the lab scored?
Each of the 12 decisions scores 0 to 10 and the result is your share of the maximum, with a short band saying what it means. The debrief shows the source behind each rationale. Lines labelled PlayCISO practice are our reasoning, not a statement by a source.
Sources
All read on 4 November 2026. Lines in the feedback marked “PlayCISO practice” are our own reasoning, not a statement by any source. The scenarios are fictional. We cite primary sources, not vendor advisories, and say where a page could not be fully read.
- Spracklen, Wijewickrama, Sakib, Maiti, Viswanath and Jadliwala: We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (arXiv 2406.10279) (submitted 12 June 2024, latest revision 2 March 2025) Abstract only: the paper itself was not read. Figures quoted on the page are the authors' own, from the abstract.
- OWASP Gen AI Security Project: LLM09:2025 Misinformation (2025 edition)
- OWASP Gen AI Security Project: LLM03:2025 Supply Chain (2025 edition)
- npm documentation: Package name guidelines (undated documentation page) The page does not mention typosquatting.
- npm documentation: Generating provenance statements (undated documentation page)
- PyPI documentation: Publishing with a Trusted Publisher (undated documentation page)
- npm documentation (v10 CLI): config (ignore-scripts, scopes and registries) (undated documentation page)
- npm documentation (v10 CLI): npm ci (undated documentation page)
- pip documentation: Secure installs (undated documentation page)
- NIST CSRC: Secure Software Development Framework (SSDF), SP 800-218 (project page; SSDF version 1.1)
- OpenSSF (SLSA): SLSA specification v1.0: About (specification v1.0)
- OpenSSF: OpenSSF Scorecard (project page)
More security tools
The tools people use most on PlayCISO.
Catch injected instructions hiding in content your AI agent should only read.
Score your readiness against the first international standard for AI security threats.
Critical CVEs across 21 major vendors, month by month — and what the 2026 surge means.
Build an ordered ruleset, replay labelled packets and catch shadowed and any-to-any rules.
Self-assess all six Functions, from Govern to Recover, and see your weakest one.
Search 172 threat actors across Microsoft, CrowdStrike, Mandiant and community names.