Verify dependencies before install.
Not scan after the fact.
AI coding agents frequently hallucinate package names or conflate real packages into fake targets.
Attackers pre-register these names with malicious payloads (slopsquatting).
isitreal verifies existence, risk, and slopsquatting in real time—before pip install runs.
Why does isitreal exist?
Autonomous coding agents generate code at incredible speed, but LLMs frequently invent plausible dependencies that don't exist—or accidentally merge two real libraries into a single non-existent package.
The Slopsquatting Attack Path
-
Hallucinated Generation: An AI coding agent generates code requiring
jscodeshiftandreact-codemod, but hallucinatespip install react-codeshift. -
Attacker Registration: Security researchers & malicious actors mine LLM outputs and pre-register
react-codeshifton PyPI with an arbitrary payload. - Blind Execution: Without pre-verification, the agent installs the package, executing untrusted setup scripts in your environment.
The isitreal Protection Layer
-
Pre-install Intercept: Before writing
requirements.txtor runningpip install, the AI agent callsverify_package("react-codeshift")via MCP. -
Instant Risk Scoring:
isitrealdetects thatreact-codeshiftis an AI-hallucinated conflation target and returns HIGH RISK. - Safe Correction: The agent halts installation and uses structured suggestions to use genuine dependencies instead.
Test package verification live
Explore how isitreal evaluates PyPI packages, detects hallucinated slopsquatters, and scores dependency risks in real time.
Quickstart & Installation
Install from PyPI in any Python 3.10+ environment, or install locally for development and CI/CD pipelines.
Standard PyPI Installation
Install the standalone CLI and Python library directly via pip, uv, or poetry:
pip install isitreal
Development Setup & Testing
To clone the source repository, run tests, and develop extensions:
git clone https://github.com/example/isitreal.git
cd isitreal
pip install -e '.[dev]'
pytest
Python API Reference
Integrate verification natively into your Python automation scripts, test harnesses, or AI agent toolkits.
Core Verification Functions
isitreal exposes clean synchronous and batch verification methods via the verify module:
from isitreal import verify
# 1. Verify a nonexistent package
res = verify.package("fancylib")
# -> PackageResult(name='fancylib', exists=False, suggestions=['fancy-lib', ...], risk=None, ...)
# 2. Verify a well-established PyPI package
res = verify.package("requests")
# -> PackageResult(name='requests', exists=True, risk='low', age_days=5640, ...)
# 3. Verify a known hallucinated/slopsquatted package
res = verify.package("react-codeshift")
# -> PackageResult(name='react-codeshift', exists=False, risk='high', reasons=['Package name is in the known list...'])
# 4. Scan a requirements.txt or pyproject.toml file
results = verify.scan("requirements.txt")
# -> list[PackageResult] sorted worst-risk-first
PackageResult Data Model
Each verification query returns an immutable Pydantic PackageResult instance with the following fields:
| Field | Type | Description |
|---|---|---|
name |
str |
The queried package name exactly as requested. |
exists |
bool |
Whether the package exists on the live PyPI registry. |
canonical_name |
str | None |
Normalized canonical package name returned by PyPI. |
latest_version |
str | None |
Latest published version (e.g. "2.32.3"). |
summary |
str | None |
Short package description from PyPI metadata. |
first_release_date |
str | None |
ISO-8601 timestamp of the package's earliest published release. |
total_releases |
int |
Number of published releases in PyPI history. |
suggestions |
list[str] |
Fuzzy close-match alternatives against the top ~5,000 package index when exists=False. |
risk |
str | None |
Risk tier: "low", "unknown", or "high" (or None for typical nonexistent packages). |
reasons |
list[str] |
Human-readable explanations justifying the assigned risk tier. |
age_days |
int | None |
Age of the package in days since its first release on PyPI. |
CLI & CI/CD Pipeline Integration
Verify single packages in your terminal or gate pull requests in automated CI pipelines using threshold exit codes.
1. Check a Single Package
Use isitreal check <package> to print a rich formatted diagnostic panel:
isitreal check requests
isitreal check react-codeshift
2. Scan Dependency Files
Scan requirements.txt or pyproject.toml and display a structured table sorted worst-risk-first:
isitreal scan requirements.txt
3. Automated CI/CD Gating (--fail-on)
Use the --fail-on flag to exit with nonzero code 1 whenever any dependency matches or exceeds the specified risk threshold:
isitreal scan requirements.txt --fail-on high
Example GitHub Actions CI Workflow
Add dependency reality-checking to your pull request pipeline:
name: Dependency Reality Check
on: [push, pull_request]
jobs:
verify-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install isitreal
run: pip install isitreal
- name: Scan requirements for slopsquatting / hallucinations
run: isitreal scan requirements.txt --fail-on high
MCP Server for AI Agents
Equip Claude Desktop, Claude Code, Cursor, and custom autonomous agents with native tools to verify dependencies before writing files.
Native FastMCP Implementation
isitreal bundles an official Python Model Context Protocol (MCP) server built on FastMCP.
When connected, AI agents automatically query two tools:
-
verify_package(name: str, ecosystem: str = "pypi") -> PackageResult— Checks a single package for existence, release age, download signals, and slopsquatting lists. -
verify_dependencies(file_contents: str) -> list[PackageResult]— Parses requirements text orpyproject.tomlcontent and returns an ordered risk assessment.
Configuration in Claude Desktop
Add the server to your Claude Desktop configuration file (~/.config/Claude/claude_desktop_config.json on macOS/Linux or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"isitreal": {
"command": "isitreal-mcp"
}
}
}
Configuration in Claude Code / CLI (`.claude.json`)
Configure project-wide verification for Claude Code by editing your repository's .claude.json:
{
"mcpServers": {
"isitreal": {
"command": "isitreal-mcp",
"args": []
}
}
}
verify_package via the isitreal MCP server before installing any third-party Python dependency or modifying requirements.txt."
Risk Scoring Engine Explained
How isitreal computes explainable, transparent risk classifications without triggering false positives.
Immediate Danger Signals
Assigned when any of the following critical conditions are met:
- Known Hallucinated List: Package is present in our curated security database of LLM hallucinations and slopsquats (e.g.
react-codeshift,django-postgres). - Conflation Detection: Name is a concatenation or hyphenation of two distinct top PyPI packages (e.g. merging
jscodeshift+react-codemod). - Infant Release Age: Package exists on PyPI but was first published less than 30 days ago.
Trusted & Established
Assigned when strong historical and download safety signals confirm legitimacy:
- Top ~5,000 PyPI Index: Package is present in our bundled local index of the most downloaded PyPI libraries.
- Mature Release History: Package has been published for ≥ 365 days with consistent release metadata and substantial download activity.
Unverified / Offline Fallback
Assigned when signals are inconclusive or network access is unavailable:
- Niche Existing Packages: Valid package published between 30 and 365 days without high download volume.
- Graceful Degradation: If PyPI network queries fail,
isitrealdegrades gracefully to"unknown"without crashing CI pipelines.