A pre-publish security analysis tool to detect AI hallucinated dependencies and slopsquatting
Project description
VibeScan ๐
VibeScan is a cross-platform, pre-publish security analysis tool built for the modern AI-assisted development era. It detects hallucinated dependencies, typosquatting ("slopsquatting"), and risky packages before they enter your codebase.
๐ฏ Why VibeScan?
As developers increasingly rely on LLM code generators, the risk of introducing non-existent or malicious packages has skyrocketed. VibeScan acts as your first line of defense, catching AI hallucinations and slopsquatting attempts before they reach production.
โจ Features
- ๐ Hallucination Detection: Verifies packages exist in npm and PyPI registries
- ๐ญ Typosquatting Defense: Detects names similar to popular packages
- ๐ Risk Scoring: Assigns explainable risk scores (0-100) to each dependency
- โก Fast & Local: Runs in seconds without sending source code to remote servers
- ๐ Cross-Ecosystem: Supports both Python and Node.js projects
- ๐จ Beautiful Output: Color-coded results with clear explanations
๐ฆ Installation
Python (PyPI)
pip install vibescan
Node.js (npm)
npm install -g vibescan-js
๐ Usage
Command Line
Scan your current project:
vibescan
Scan a specific directory:
vibescan ./my-project
Enable debug output:
vibescan --debug
Pre-commit Hook
Add to your .pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: vibescan
name: VibeScan Security Check
entry: vibescan
language: system
pass_filenames: false
always_run: true
CI/CD Integration
GitHub Actions
name: Security Scan
on: [push, pull_request]
jobs:
vibescan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install VibeScan
run: pip install vibescan
- name: Run VibeScan
run: vibescan
GitLab CI
vibescan:
image: python:3.11
script:
- pip install vibescan
- vibescan
only:
- merge_requests
๐ Risk Scoring
VibeScan assigns risk scores based on multiple factors:
| Score | Severity | Description |
|---|---|---|
| 0-9 | โ Safe | No risks detected |
| 10-59 | โ ๏ธ Suspicious | Review recommended |
| 60-100 | โ Critical | Action required |
Risk Factors
- Package doesn't exist: +100 (likely AI hallucination)
- Typosquatting detected: +60 (similar to popular package)
- Suspiciously new (<7 days): +40
- Relatively new (<30 days): +10
๐ What It Checks
Supported Files
package.json(npm dependencies & devDependencies)requirements.txt(Python packages)
Detection Capabilities
- Registry Verification: Checks if packages exist on npm/PyPI
- Typosquatting: Detects names similar to popular packages:
reacttโ Similar toreactreqeustsโ Similar torequests
- Age Analysis: Flags newly created packages
- Popularity Heuristics: Identifies suspicious low-usage packages
๐ Example Output
=========================================
VibeScan
=========================================
Analyzing dependencies for AI hallucinations and slopsquatting...
Analyzing 5 dependencies...
โ 3 Safe Dependencies
โ 1 Suspicious Dependencies (Review Recommended)
- new-package (npm) - Score: 40/100
* Package is suspiciously new (Created 2 days ago)
โ 1 Critical Risk Dependencies (Action Required!)
- crypto-secure-hash-v2-hallucinated (npm) - Score: 100/100
* Package does not exist in registry (Likely AI Hallucination/Slopsquat target)
-----------------------------------------
VibeScan detected CRITICAL risks. Build failed.
๐งช Development
Running Tests
# Install dev dependencies
pip install -e .
pip install pytest pytest-mock responses
# Run tests
pytest tests/ -v
Project Structure
vibescan/
โโโ vibescan/
โ โโโ cli.py # Command-line interface
โ โโโ parsers.py # Package file parsers
โ โโโ scorer.py # Risk scoring logic
โ โโโ reporter.py # Output formatting
โ โโโ checkers/
โ โโโ registry_checker.py # Registry verification
โ โโโ typosquat_checker.py # Typosquatting detection
โโโ tests/ # Test suite
โโโ js-wrapper/ # Node.js wrapper
โโโ setup.py # Python package config
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
MIT License - see LICENSE file for details
๐ Privacy
VibeScan respects your privacy:
- Analyzes code locally
- Only sends package names to public registries for verification
- No proprietary code is transmitted
๐ฏ Roadmap
- Support for more package managers (Cargo, Go modules)
- Static code analysis (AST) for unusual imports
- Configurable risk thresholds
- JSON output format
- Web dashboard for team visibility
- Integration with popular IDEs
๐ก Use Cases
- Pre-commit: Catch risky dependencies before committing
- CI/CD: Block PRs with suspicious packages
- Code Review: Verify external contributions
- Security Audit: Scan existing projects for risks
๐ Acknowledgments
Built to address the emerging threat of "slopsquatting" - malicious packages targeting AI-generated code suggestions.
Stay safe in the AI coding era! ๐ก๏ธ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibescan-0.1.0.tar.gz.
File metadata
- Download URL: vibescan-0.1.0.tar.gz
- Upload date:
- Size: 63.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07b4fefad130914151b560a89910488df80f6411f672c0e3d2968ce79ebd8992
|
|
| MD5 |
6d168ebe9275300e82a891d7ee2bd0f2
|
|
| BLAKE2b-256 |
c1a774aed185d2c57ed6b79b7391d7cedfa24dc26ba2857594995cbf19d02fb5
|
File details
Details for the file vibescan-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vibescan-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a9eff59cf8fd9690d254bcb505a38ce1df001a944a91910102d445f67262729
|
|
| MD5 |
3c0517bc2d3ab18b960ca6c07f5e0b13
|
|
| BLAKE2b-256 |
f797256c29d3aff229f3b63d4f459df1549e19a3d141b735039854d36856b7d1
|