Skip to main content Switch to mobile version realdep 0.1.2 Stop AI coding agents from installing hallucinated, typo-squatted or brand-new malicious packages (slopsquatting). Checks pip, uv, poetry, npm, yarn, pnpm, bun, cargo, go and gem installs and manifest edits.
pip install realdep==0.1.2 Copy PIP instructions
Stop AI coding agents from installing packages that don't exist, or shouldn't. Realdep checks every package an agent tries to install (or add to a manifest) against the real registry before it happens, and blocks hallucinated names, typosquats and freshly registered slopsquats, telling the agent the name it probably meant.
The problem: slopsquatting
Language models regularly invent package names that sound right but don't exist: huggingface-cli-tools, react-codeshift, flask-jwt-simple-auth. Attackers watch for those names, register them on PyPI or npm, and fill them with malware. The next agent that hallucinates the same name runs pip install
Classic typosquats (reqeusts, expresss) and import-name confusion (pip install sklearn, which should be scikit-learn) hit agents the same way, because agents type fast and never double-check.
Before an install runs, Realdep:
Parses the command or manifest change: pip, uv, poetry, pipenv, pdm, pipx, uvx, npm, npx, yarn, pnpm, bun, cargo, go, gem; requirement files passed with -r; and edits to requirements.txt, pyproject.toml, package.json, Cargo.toml, go.mod and Gemfile.
Skips the thousands of packages everyone uses (bundled popularity lists, no network needed).
Asks the real registry about everything else: does it exist, when was it first published, how many releases, how many downloads, does it run install scripts?
Tells the agent how to fix it. A block comes with the reason and the likely intended name, so the agent corrects itself instead of retrying:
$ realdep check -- pip install fastapi reqeusts sklearn BLOCK pypi reqeusts 'reqeusts' does not exist on PyPI; it may be a hallucinated name. Did you mean 'requests'? suggestion: requests WARN pypi sklearn 'sklearn' is an import name; the package that provides it is 'scikit-learn' suggestion: scikit-learn ok pypi fastapi widely used (top 63 on PyPI) $ realdep pkg npm react-codeshift expresss BLOCK npm react-codeshift matches the slopsquatting profile: first published 321 day(s) ago, 1 release(s), 15 downloads last week BLOCK npm expresss name is one or two characters away from the popular package 'express' (possible typosquat) only release is a placeholder version (0.0.0) suggestion: express Install
pip install realdep Python 3.11+. Zero runtime dependencies (standard library only), because a supply-chain guard should not widen your supply chain.
Guard a coding agent (recommended)
Agents that support command hooks before tool use can run Realdep on every shell command and file edit:
realdep hook --print-config {"hooks": {"PreToolUse": [{"matcher": "*", "hooks": [{"type": "command", "command": "realdep hook", "timeout": 30}]}]}} Merge that into your agent's hooks settings. Blocked installs exit with code 2 and a reason the agent reads, and warnings appear as a system message. Unrelated commands pass in milliseconds with no network. See docs/hooks.md.
realdep check -- npm i some-package # exit 3 if anything is blocked realdep pkg pypi requests reqeusts # check names directly realdep check --strict -- pip install x # exit 3 on warnings too CI
realdep scan requirements.txt package.json pyproject.toml # exit 3 on any block Catch hallucinated dependencies that slipped into a pull request. See docs/ci.md.
Use Realdep alongside dependency auditing: it stops bad names from getting in, and auditors find vulnerabilities in the good ones.
Getting started · Decision rules · Agent hooks · CI · Configuration · Threat model · FAQ
An old, popular, legitimate-looking package that turns malicious is a different problem; use a vulnerability and malware scanner for that.
Decisions use public registry metadata and heuristics. Tune thresholds and keep allow/deny lists in .realdep.json.
Private registries and custom indexes are flagged, not verified.
If the registry is unreachable, Realdep warns and allows by default (fail_closed changes that).
Found a bug, or Realdep got a result wrong? Open an issue and include the output of:
realdep doctor It prints versions, platform and configuration health with paths, your user name and secrets removed, so it is safe to paste. Report security vulnerabilities privately instead; see SECURITY.md.
Report vulnerabilities privately: see SECURITY.md.
Released: Dec 4, 2026
Author: Prayash Bikram Shah
Both files in this release have provenance metadata.
View provenance details
Apache-2.0 View SPDX License List
agents ai-security dependency-confusion npm pypi slopsquatting supply-chain typosquatting
Development Status 3 - Alpha
Intended Audience Developers
Information Technology
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Release files for realdep 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 213.8 kB
Release files / realdep-0.1.2.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Release files / realdep-0.1.2-py3-none-any.whl
Security for realdep 0.1.2
Both files in this release have been uploaded with provenance metadata.
With provenance realdep-0.1.2.tar.gz Dec 4, 2026
With provenance realdep-0.1.2-py3-none-any.whl Dec 4, 2026
Attestation for realdep-0.1.2.tar.gz
Attestation for realdep-0.1.2-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 4, 2026 2 release files Full provenance
Dec 2, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 1274d9b











