AI-first security scanner with 4,000+ detection patterns for AI/ML, agents, and LLM applications. ๐ค Works out of the box - no tool installation required. ๐จ 133 CVEs: Log4Shell, Spring4Shell, XZ Utils, LangChain RCE, MCP-Remote RCE, React2Shell โจ NEW v2026.3.0: 514 FP filters, scanner precision tuning, compound gates, yamllint removed!
MEDUSA is an AI-first security scanner with 4,000+ detection patterns that works out of the box. Simply install and scan - no external tool installation required. MEDUSA's built-in rules detect vulnerabilities in AI/ML applications, LLM agents, MCP servers, RAG pipelines, and traditional code.
- ๐ค 4,000+ AI Security Patterns - Industry-leading coverage for AI/ML, agents, and LLM applications
- ๐ Zero Setup Required - Works immediately after
pip install- no tool installation needed - ๐จ 133 CVE Detections - Log4Shell, Spring4Shell, XZ Utils backdoor, LangChain RCE, MCP remote code execution, React2Shell, and more
- โก Parallel Processing - Multi-core scanning (10-40x faster than sequential)
- ๐จ Beautiful CLI - Rich terminal output with progress bars
- ๐ง IDE Integration - Claude Code, Cursor, VS Code, Gemini CLI support
- ๐ Smart Caching - Skip unchanged files for lightning-fast rescans
- โ๏ธ Configurable -
.medusa.ymlfor project-specific settings - ๐ Cross-Platform - Native Windows, macOS, and Linux support
- ๐ Multiple Reports - JSON, HTML, Markdown, SARIF exports for any workflow
- ๐ง Optional Linter Support - Auto-detects external linters if installed for enhanced coverage
Scanner Precision + FP Tuning - Compound scanner gates, precision-tuned patterns, and 514 FP filters.
| Change | Description |
|---|---|
| ๐ฏ 514 FP Filter Patterns | Up from 430 โ 96.8% false positive reduction on real-world projects |
| ๐ง Scanner Attribution Fix | Parallel scan findings now correctly attributed to originating scanner |
| ๐ก๏ธ Compound Scanner Gates | MultiAgent, Steganography, LLMGuard scanners require framework indicators to fire |
| โ๏ธ YAMLScanner Removed | Dropped yamllint (style linter) โ Trivy + Semgrep + MEDUSA rules cover YAML security |
| ๐ Precision Pattern Tuning | MCP, RAG, tool poisoning, multi-agent patterns tightened to reduce FPs |
| ๐จ 133 Critical CVEs | CVEMiner database covering LangChain, PyTorch, MCP, Log4Shell, XZ Utils |
| ๐ค 4,000+ AI Patterns | Built-in rules for AI/ML, agents, MCP, RAG, prompt injection |
External Linters (optional):
- MEDUSA auto-detects
bandit,eslint,shellcheck, etc. if installed - See Optional Tools Guide for installation instructions
# Install MEDUSA (works on Windows, macOS, Linux)
pip install medusa-security
# Run your first scan - that's it!
medusa scan .Virtual Environment (Recommended):
# Create and activate virtual environment
python3 -m venv medusa-env
source medusa-env/bin/activate # On Windows: medusa-env\Scripts\activate
# Install and scan
pip install medusa-security
medusa scan .Platform Notes:
- Windows: Use
py -m medusaifmedusacommand is not found - macOS/Linux: Should work out of the box
# Install modelscan for ML model vulnerability detection
medusa install --ai-toolsMEDUSA auto-detects external linters if installed (bandit, eslint, shellcheck, etc.) and uses them automatically to enhance scan coverage.
See Installation Guide โ for platform-specific instructions.
Note: External linters are optional. MEDUSA's 4,000+ built-in rules work without them. For installation support, please refer to each tool vendor's documentation.
Scan Startup - Repository analysis, language detection, AI pattern recognition:
Live Progress - Real-time scanner progress with issue counts:
Scan Complete - Summary with stats and report paths:
MEDUSA generates beautiful reports in multiple formats:
JSON - Machine-readable for CI/CD integration
medusa scan . --format jsonHTML - Stunning glassmorphism UI with interactive charts
medusa scan . --format htmlMarkdown - Documentation-friendly for GitHub/wikis
medusa scan . --format markdownAll Formats - Generate everything at once
medusa scan . --format allMEDUSA supports 41 different scanner types covering all major programming languages and file formats:
| Language | Scanner | Extensions |
|---|---|---|
| Python | Bandit | .py |
| JavaScript/TypeScript | ESLint | .js, .jsx, .ts, .tsx |
| Go | golangci-lint | .go |
| Ruby | RuboCop | .rb, .rake, .gemspec |
| PHP | PHPStan | .php |
| Rust | Clippy | .rs |
| Java | Checkstyle | .java |
| C/C++ | cppcheck | .c, .cpp, .cc, .cxx, .h, .hpp |
| C# | Roslynator | .cs |
| Language | Scanner | Extensions |
|---|---|---|
| Kotlin | ktlint | .kt, .kts |
| Scala | Scalastyle | .scala |
| Groovy | CodeNarc | .groovy, .gradle |
| Language | Scanner | Extensions |
|---|---|---|
| Haskell | HLint | .hs, .lhs |
| Elixir | Credo | .ex, .exs |
| Erlang | Elvis | .erl, .hrl |
| F# | FSharpLint | .fs, .fsx |
| Clojure | clj-kondo | .clj, .cljs, .cljc |
| Language | Scanner | Extensions |
|---|---|---|
| Swift | SwiftLint | .swift |
| Objective-C | OCLint | .m, .mm |
| Language | Scanner | Extensions |
|---|---|---|
| CSS/SCSS/Sass/Less | Stylelint | .css, .scss, .sass, .less |
| HTML | HTMLHint | .html, .htm |
| Vue.js | ESLint | .vue |
| Language | Scanner | Extensions |
|---|---|---|
| Terraform | tflint | .tf, .tfvars |
| Ansible | ansible-lint | .yml (playbooks) |
| Kubernetes | kubeval | .yml, .yaml (manifests) |
| CloudFormation | cfn-lint | .yml, .yaml, .json (templates) |
| Language | Scanner | Extensions |
|---|---|---|
| JSON | built-in | .json |
| TOML | taplo | .toml |
| XML | xmllint | .xml |
| Protobuf | buf lint | .proto |
| Language | Scanner | Extensions |
|---|---|---|
| Bash/Shell | ShellCheck | .sh, .bash |
| PowerShell | PSScriptAnalyzer | .ps1, .psm1 |
| Lua | luacheck | .lua |
| Perl | perlcritic | .pl, .pm |
| Language | Scanner | Extensions |
|---|---|---|
| Markdown | markdownlint | .md |
| reStructuredText | rst-lint | .rst |
| Language | Scanner | Extensions |
|---|---|---|
| SQL | SQLFluff | .sql |
| R | lintr | .r, .R |
| Dart | dart analyze | .dart |
| Solidity | solhint | .sol |
| Docker | hadolint | Dockerfile* |
Total: 41 scanner types covering 100+ file extensions
MEDUSA now detects CVE-2025-55182 "React2Shell" - a CVSS 10.0 RCE vulnerability affecting React Server Components and Next.js.
# Check if your project is vulnerable
medusa scan .
# Vulnerable versions detected:
# - React 19.0.0 - 19.2.0 (Server Components)
# - Next.js 15.0.0 - 15.0.4 (App Router)
# - Various canary/rc releasesScans: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
Fix: Upgrade to React 19.0.1+ and Next.js 15.0.5+
MEDUSA provides industry-leading AI security scanning with 4,000+ detection patterns for the agentic AI era. Updated for OWASP Top 10 for LLM Applications 2025 and includes detection for CVE-2025-6514 (mcp-remote RCE).
Full AI Security Documentation
| Category | Patterns | Detects |
|---|---|---|
| Prompt Injection | 800+ | Direct/indirect injection, jailbreaks, role manipulation |
| MCP Server Security | 400+ | Tool poisoning, CVE-2025-6514, confused deputy, command injection |
| RAG Security | 300+ | Vector injection, document poisoning, tenant isolation |
| Agent Security | 500+ | Excessive agency, memory poisoning, HITL bypass |
| Model Security | 400+ | Insecure loading, checkpoint exposure, adversarial attacks |
| Supply Chain | 350+ | Dependency confusion, typosquatting, malicious packages |
| Traditional SAST | 1,400+ | SQL injection, XSS, command injection, secrets |
|
Context & Input Attacks
Memory & State Attacks
Tool & Action Attacks
|
Workflow & Routing Attacks
RAG & Knowledge Attacks
Advanced Attacks
|
.cursorrules # Cursor AI instructions
CLAUDE.md # Claude Code context
.claude/ # Claude configuration directory
copilot-instructions.md # GitHub Copilot
AGENTS.md # Multi-agent definitions
mcp.json / mcp-config.json # MCP server configs
*.mcp.ts / *.mcp.py # MCP server code
rag.json / knowledge.json # RAG configurations
memory.json # Agent memory configs
# Scan AI configuration files
medusa scan . --ai-only
# Example output:
# ๐ AI Security Scan Results
# โโโ .cursorrules: 3 issues (1 CRITICAL, 2 HIGH)
# โ โโโ AIC001: Prompt injection - ignore previous instructions (line 15)
# โ โโโ AIC011: Tool shadowing - override default tools (line 23)
# โโโ mcp-config.json: 2 issues (2 HIGH)
# โ โโโ MCP003: Dangerous path - home directory access (line 8)
# โโโ rag_config.json: 1 issue (1 CRITICAL)
# โโโ AIR010: Knowledge base injection pattern detected (line 45)# Initialize configuration
medusa init
# Scan current directory
medusa scan .
# Scan specific directory
medusa scan /path/to/project
# Quick scan (changed files only)
medusa scan . --quick
# Force full scan (ignore cache)
medusa scan . --force
# Use specific number of workers
medusa scan . --workers 4
# Fail on HIGH severity or above
medusa scan . --fail-on high
# Custom output directory
medusa scan . -o /tmp/reports# Check tool status
medusa install --check
# Install AI tools (modelscan for ML model scanning)
medusa install --ai-tools
# Show detailed output
medusa install --ai-tools --debugNote: MEDUSA v2026.2+ no longer installs external linters. Install them via your package manager (apt, brew, npm, pip) if needed. MEDUSA auto-detects and uses any installed linters.
# Interactive initialization wizard
medusa init
# Initialize with specific IDE
medusa init --ide claude-code
# Initialize with multiple IDEs
medusa init --ide claude-code --ide gemini-cli --ide cursor
# Initialize with all supported IDEs
medusa init --ide all
# Force overwrite existing config
medusa init --force
# Initialize and install tools
medusa init --install# Uninstall modelscan
medusa uninstall modelscan
# Check for updates
medusa version --check-updates
# Show current configuration
medusa config
# Override scanner for specific file
medusa override path/to/file.yaml YAMLScanner
# List available scanners
medusa override --list
# Show current overrides
medusa override --show
# Remove override
medusa override path/to/file.yaml --remove| Option | Description |
|---|---|
TARGET |
Directory or file to scan (default: .) |
-w, --workers N |
Number of parallel workers (default: auto-detect) |
--quick |
Quick scan (changed files only, requires git) |
--force |
Force full scan (ignore cache) |
--no-cache |
Disable result caching |
--fail-on LEVEL |
Exit with error on severity: critical, high, medium, low |
-o, --output PATH |
Custom output directory for reports |
--format FORMAT |
Output format: json, html, sarif, junit, text (can specify multiple) |
--no-report |
Skip generating HTML report |
| Option | Description |
|---|---|
--check |
Check tool status |
--ai-tools |
Install AI security tools (modelscan) |
--debug |
Show detailed debug output |
v2026.2+ Change: MEDUSA no longer manages external linter installation. The
--allflag is deprecated. Install external linters via your system package manager if needed.
MEDUSA uses a YAML configuration file for project-specific settings:
# MEDUSA Configuration File
version: 2026.3.0
# Scanner control
scanners:
enabled: [] # Empty = all scanners enabled
disabled: [] # List scanners to disable
# Build failure settings
fail_on: high # critical | high | medium | low
# Exclusion patterns
exclude:
paths:
- node_modules/
- venv/
- .venv/
- .git/
- __pycache__/
- dist/
- build/
files:
- "*.min.js"
- "*.min.css"
# IDE integration
ide:
claude_code:
enabled: true
auto_scan: true
cursor:
enabled: false
vscode:
enabled: false
# Scan settings
workers: null # null = auto-detect CPU cores
cache_enabled: true # Enable file caching for speedmedusa initThis creates .medusa.yml with sensible defaults and auto-detects your IDE.
MEDUSA supports 5 major AI coding assistants with native integrations. Initialize with medusa init --ide all or select specific platforms.
| IDE | Context File | Commands | Status |
|---|---|---|---|
| Claude Code | CLAUDE.md |
/medusa-scan, /medusa-install |
โ Full Support |
| Gemini CLI | GEMINI.md |
/scan, /install |
โ Full Support |
| OpenAI Codex | AGENTS.md |
Native slash commands | โ Full Support |
| GitHub Copilot | .github/copilot-instructions.md |
Code suggestions | โ Full Support |
| Cursor | Reuses CLAUDE.md |
MCP + Claude commands | โ Full Support |
# Setup for all IDEs (recommended)
medusa init --ide all
# Or select specific platforms
medusa init --ide claude-code --ide gemini-cliWhat it creates:
CLAUDE.md- Project context file.claude/agents/medusa/agent.json- Agent configuration.claude/commands/medusa-scan.md- Scan slash command.claude/commands/medusa-install.md- Install slash command
Usage:
Type: /medusa-scan
Claude: *runs security scan*
Results: Displayed in terminal + chat
What it creates:
GEMINI.md- Project context file.gemini/commands/scan.toml- Scan command config.gemini/commands/install.toml- Install command config
Usage:
gemini /scan # Full scan
gemini /scan --quick # Quick scan
gemini /install --check # Check toolsWhat it creates:
AGENTS.md- Project context (root level)
Usage:
Ask: "Run a security scan"
Codex: *executes medusa scan .*
What it creates:
.github/copilot-instructions.md- Security standards and best practices
How it helps:
- Knows project security standards
- Suggests secure code patterns
- Recommends running scans after changes
- Helps fix security issues
What it creates:
.cursor/mcp-config.json- MCP server configuration- Reuses
.claude/structure (Cursor is VS Code fork)
Usage:
- Works like Claude Code integration
- MCP-native for future deeper integration
MEDUSA automatically monitors system load and adjusts worker count:
# Auto-detects optimal workers based on:
# - CPU usage
# - Memory usage
# - Load average
# - Available cores
# Warns when system is overloaded:
โ ๏ธ High CPU usage: 85.3%
Using 2 workers (reduced due to system load)Hash-based caching skips unchanged files:
# First scan
๐ Files scanned: 145
โฑ๏ธ Total time: 47.28s
# Second scan (no changes)
๐ Files scanned: 0
โก Files cached: 145
โฑ๏ธ Total time: 2.15s # 22ร faster!Multi-core scanning for massive speedups:
Single-threaded: 417.5 seconds
6 workers: 47.3 seconds # 8.8ร faster
24 workers: ~18 seconds # 23ร faster
# 1. Initialize
cd my-awesome-project
medusa init
๐ MEDUSA Initialization Wizard
โ
Step 1: Project Analysis
Found 15 language types
Primary: PythonScanner (44 files)
โ
Step 2: Scanner Availability
Available: 6/42 scanners
Missing: 36 tools
โ
Step 3: Configuration
Created .medusa.yml
Auto-detected IDE: Claude Code
โ
Step 4: IDE Integration
Created .claude/agents/medusa/agent.json
Created .claude/commands/medusa-scan.md
โ
MEDUSA Initialized Successfully!
# 2. First scan
medusa scan .
๐ Issues found: 23
CRITICAL: 0
HIGH: 2
MEDIUM: 18
LOW: 3
# 3. Fix issues and rescan
medusa scan . --quick
โก Files cached: 142
๐ Issues found: 12 # Progress!# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]
jobs:
medusa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install MEDUSA
run: pip install medusa-security
- name: Run security scan
run: medusa scan . --fail-on highNote: No tool installation step needed - MEDUSA's 4,000+ built-in rules work immediately.
All scanners follow a consistent pattern:
class PythonScanner(BaseScanner):
"""Scanner for Python files using Bandit"""
def get_tool_name(self) -> str:
return "bandit"
def get_file_extensions(self) -> List[str]:
return [".py"]
def scan_file(self, file_path: Path) -> ScannerResult:
# Run bandit on file
# Parse JSON output
# Map severity levels
# Return structured issues
return ScannerResult(...)Scanners automatically register themselves:
# medusa/scanners/__init__.py
registry = ScannerRegistry()
registry.register(PythonScanner())
registry.register(JavaScriptScanner())
# ... all 41 scannersUnified severity levels across all tools:
- CRITICAL - Security vulnerabilities, fatal errors
- HIGH - Errors, security warnings
- MEDIUM - Warnings, code quality issues
- LOW - Style issues, conventions
- INFO - Suggestions, refactoring opportunities
MEDUSA scans itself โ and real-world projects:
Self-scan (473 files):
โ
Issues found: 114 (pre-filter) โ 0 (post-filter)
โ
FP reduction: 100% on own codebase
โฑ๏ธ Time: 8.2s
OpenClaw benchmark (4,124 files, 751K LOC):
๐ Issues found: 825 (post-filter)
โ
FPs filtered: 11,436 (93.9% reduction)
โฑ๏ธ Time: 3.3 hours (42 scanners)
| Project Size | Files | Time | Speed |
|---|---|---|---|
| Small (MEDUSA self-scan) | 473 | ~8s | 59 files/s |
| Medium | 1,000 | ~45s | 22 files/s |
| Large (OpenClaw) | 4,124 | ~3.3h | 0.34 files/s* |
*Large project time dominated by external tool subprocesses (Semgrep, Trivy, GitLeaks). Built-in pattern scanning is near-instant.
- 4,000+ Detection Patterns - Industry-leading AI security coverage
- 76 Specialized Analyzers - Comprehensive language and platform coverage
- 133 Critical CVEs - CVEMiner database for known vulnerability scanning
- 514 FP Filter Patterns - 96.8% false positive reduction rate on real-world projects
- Compound Scanner Gates - MultiAgent, Steganography, LLMGuard scanners use framework-aware gates
- Scanner Attribution Fix - Parallel scan findings correctly attributed to originating scanner
- Agent Protocol Security - UCP, AP2, ACP vulnerability detection (91 rules)
- Dataset Poisoning Detection - CSV, JSON, JSONL injection scanning
- Code-Level Prompt Injection - F-string injection, ChatML tokens, role manipulation
- Cross-Platform - Native Windows, macOS, Linux support
- IDE Integration - Claude Code, Cursor, Gemini CLI, GitHub Copilot, OpenAI Codex
- MEDUSA Professional - Runtime proxy filters for production LLM protection
- GitHub App - Automatic PR scanning
- VS Code Extension - Native IDE integration
- REST API - CI/CD pipeline integration
We welcome contributions! Here's how to get started:
# 1. Fork and clone
git clone https://github.com/yourusername/medusa.git
cd medusa
# 2. Create virtual environment
python -m venv .venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
# 3. Install in editable mode
pip install -e ".[dev]"
# 4. Run tests
pytest
# 5. Create feature branch
git checkout -b feature/my-awesome-feature
# 6. Make changes and test
medusa scan . # Dogfood your changes!
# 7. Submit PR
git push origin feature/my-awesome-featureSee docs/development/adding-scanners.md for a guide on adding new language support.
AGPL-3.0-or-later - See LICENSE file
MEDUSA is free and open source software. You can use, modify, and distribute it freely, but any modifications or derivative works (including SaaS deployments) must also be released under AGPL-3.0.
For commercial licensing options, contact: support@pantheonsecurity.io
MEDUSA Professional adds runtime protection for production LLM applications - blocking prompt injection, jailbreaking, and data exfiltration attempts in real-time before they reach your models.
| Feature | Open Source | Professional | Enterprise |
|---|---|---|---|
| Static scanning (4,000+ patterns) | Yes | Yes | Yes |
| Runtime proxy filters (1,100+) | - | Yes | Yes |
| REST API & webhooks | - | Yes | Yes |
| Custom rules & SSO | - | - | Yes |
| Price | Free | $99/dev/mo | $499/50 devs/mo |
The runtime proxy is currently in private beta. If you're protecting production LLM applications and want early access, reach out to support@pantheonsecurity.io.
Development:
- Pantheon Security
- Claude AI (Anthropic) - AI-assisted development
Built With:
- Python 3.10+
- Click - CLI framework
- Rich - Terminal formatting
- Bandit, ESLint, ShellCheck, and 39+ other open-source security tools
Inspired By:
- Bandit (Python security)
- SonarQube (multi-language analysis)
- Semgrep (pattern-based security)
- Mega-Linter (comprehensive linting)
- Quick Start - Get running in 5 minutes
- AI Security Scanning - Complete guide to AI/LLM security (OWASP 2025, MCP, RAG)
- Handling False Positives - Reduce noise, find real issues
- IDE Integration - Setup Claude Code, Gemini, Copilot
- GitHub Issues: Report bugs or request features
- Email: support@pantheonsecurity.io
- Documentation: https://docs.pantheonsecurity.io
- Discord: https://discord.gg/medusa (coming soon)
Version: 2026.3.0 Release Date: 2026-02-16 Detection Patterns: 4,000+ AI security rules Analyzers: 76 specialized scanners FP Filter Patterns: 514 intelligent filters (96.8% reduction rate) CVE Coverage: 133 critical vulnerabilities Language Coverage: 46+ file types Platform Support: Linux, macOS, Windows AI Integration: Claude Code, Gemini CLI, GitHub Copilot, Cursor, OpenAI Codex Standards: OWASP Top 10 for LLM 2025, MITRE ATLAS Downloads: 11,500+ on PyPI
- โ 4,000+ patterns (not just Python security)
- โ AI/ML security coverage
- โ Zero setup required
- โ IDE integration
- โ
Simpler setup (
pip install && scan) - โ No server required
- โ AI-first security focus
- โ Free and open source
- โ AI/ML-specific rules built-in
- โ MCP, RAG, agent security
- โ Better IDE integration
- โ No rule configuration needed
- โ Works immediately (no tool installation)
- โ AI security patterns included
- โ Parallel processing
- โ Smart caching
๐๐๐ MEDUSA - Multi-Language Security Scanner ๐๐๐
One Command. Complete Security.
medusa init && medusa scan .Last Updated: 2026-02-16 Status: Production Ready Current Version: v2026.3.0 - Scanner Precision + FP Tuning


