freshcrate
Skin:/
Home > MCP Servers > medusa

medusa

AI-first security scanner with 76 analyzers, 9,600+ detection rules, and repo poisoning detection for AI/ML, LLM agents, and MCP servers. Scan any GitHub repo with: medusa scan --git user/repo

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

AI-first security scanner with 76 analyzers, 9,600+ detection rules, and repo poisoning detection for AI/ML, LLM agents, and MCP servers. Scan any GitHub repo with: medusa scan --git user/repo

README

🐍 MEDUSA - AI Security Scanner

PyPI Downloads Python License: AGPL-3.0 Tests Windows macOS Linux

AI-first security scanner with 9,600+ detection patterns for AI/ML, agents, and LLM applications. 🤖 Works out of the box - no tool installation required. 🚨 200 CVEs: Log4Shell, Spring4Shell, XZ Utils, LangChain RCE, MCP-Remote RCE, React2Shell đŸ”Ĩ NEW: medusa scan --git <URL> — Scan any repo for AI supply chain attacks (repo poisoning, prompt injection, MCP tool poisoning) ✨ v2026.5.2: Security hardening — credential leak fixes, XSS protection, symlink safety, code snippet sanitization, 14 bug fixes


đŸŽ¯ What is MEDUSA?

MEDUSA is an AI-first security scanner with 9,600+ 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.

✨ Key Features

  • đŸ”Ĩ medusa scan --git <URL> - Scan any GitHub repo for AI supply chain attacks in seconds
  • 🤖 9,600+ AI Security Patterns - Industry-leading coverage for AI/ML, agents, and LLM applications
  • đŸ›Ąī¸ Repo Poisoning Detection - Detects weaponized AI editor configs across 28+ file types (Cursor, Cline, Copilot, Claude Code, Gemini, Kiro, and more)
  • 🚀 Zero Setup Required - Works immediately after pip install - no tool installation needed
  • 🚨 200 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.yml for 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

🆕 What's New in v2026.5.2

Security Hardening — 16 security and bug fixes across the scanner, reporter, and installer.

What's Fixed Details
🔐 Credential Leak Fixed Auth tokens in --git URLs now stripped from all console/log output
đŸ›Ąī¸ XSS Protection HTML report fields escaped with html.escape() — no stored XSS from scanned file content
🔗 Symlink Safety Symlinks in scanned repos skipped — prevents /etc/shadow-style path traversal
📋 Secret Truncation Code snippets capped at 200 chars in reports — secrets don't leak verbatim into JSON/SARIF
🐛 Cache Fix FileMetadata.cached_issues now returns actual cached findings (was returning empty)
🧩 Dotfile Scanning Extensionless AI context files (.cursorrules, .env, .mcp.json) now fully analyzed
📝 Better Logging Invalid regex in rule YAML now uses logging.warning() instead of print()

Previous: v2026.5.0/5.1 — 9,600+ rules, 200 CVEs, Windows PATH auto-fix, 79 scanner categories, --fail-on severity fix.

External Linters (optional): MEDUSA auto-detects bandit, eslint, shellcheck, etc. if installed. See Optional Tools Guide.


🚀 Quick Start

Installation

# 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 medusa if medusa command is not found
  • macOS/Linux: Should work out of the box

Scan Any GitHub Repo

# Scan a remote repo for AI supply chain attacks
medusa scan --git https://github.com/org/repo

# Shorthand - just user/repo
medusa scan --git org/repo

# Scan a specific branch
medusa scan --git https://github.com/org/repo/tree/main

MEDUSA automatically detects 28+ AI editor config files that are known attack vectors:

Risk Level Files Detected
Critical (RCE) .cursorrules, .cursor/mcp.json, .clinerules/, .windsurfrules, .codex/config.toml, .kiro/settings/mcp.json, .vscode/settings.json, mcp.json
High CLAUDE.md, GEMINI.md, AGENTS.md, AGENT.md, SKILL.md, .github/copilot-instructions.md, CONVENTIONS.md, .amazonq/rules/, .roo/rules/, .augment/rules/

Known attacks detected: Clinejection, CurXecute (CVE-2025-54135), IDEsaster (CVE-2025-64660), ToxicSkills, CamoLeak, RoguePilot, AIShellJack, Cacheract

Optional: AI Model Scanning

# Install modelscan for ML model vulnerability detection
medusa install --ai-tools

Optional: External Linters

MEDUSA 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 9,600+ built-in rules work without them. For installation support, please refer to each tool vendor's documentation.

Demo

MEDUSA in action

📊 Report Formats

MEDUSA generates beautiful reports in multiple formats:

JSON - Machine-readable for CI/CD integration

medusa scan . --format json

HTML - Stunning glassmorphism UI with interactive charts

medusa scan . --format html

Markdown - Documentation-friendly for GitHub/wikis

medusa scan . --format markdown

All Formats - Generate everything at once

medusa scan . --format all

📚 Language Support

MEDUSA supports 79 scanner types covering AI/ML security, all major programming languages, and file formats:

Backend Languages (9)

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

JVM Languages (3)

Language Scanner Extensions
Kotlin ktlint .kt, .kts
Scala Scalastyle .scala
Groovy CodeNarc .groovy, .gradle

Functional Languages (5)

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

Mobile Development (2)

Language Scanner Extensions
Swift SwiftLint .swift
Objective-C OCLint .m, .mm

Frontend & Styling (3)

Language Scanner Extensions
CSS/SCSS/Sass/Less Stylelint .css, .scss, .sass, .less
HTML HTMLHint .html, .htm
Vue.js ESLint .vue

Infrastructure as Code (4)

Language Scanner Extensions
Terraform tflint .tf, .tfvars
Ansible ansible-lint .yml (playbooks)
Kubernetes kubeval .yml, .yaml (manifests)
CloudFormation cfn-lint .yml, .yaml, .json (templates)

Configuration Files (4)

Language Scanner Extensions
JSON built-in .json
TOML taplo .toml
XML xmllint .xml
Protobuf buf lint .proto

Shell & Scripts (4)

Language Scanner Extensions
Bash/Shell ShellCheck .sh, .bash
PowerShell PSScriptAnalyzer .ps1, .psm1
Lua luacheck .lua
Perl perlcritic .pl, .pm

Documentation (2)

Language Scanner Extensions
Markdown markdownlint .md
reStructuredText rst-lint .rst

Other Languages (5)

Language Scanner Extensions
SQL SQLFluff .sql
R lintr .r, .R
Dart dart analyze .dart
Solidity solhint .sol
Docker hadolint Dockerfile*

Total: 79 scanner types — 41 language/tool scanners + 38 AI/ML security scanners — covering 100+ file extensions


🚨 React2Shell CVE Detection (NEW in v2025.8)

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 releases

Scans: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml

Fix: Upgrade to React 19.0.1+ and Next.js 15.0.5+


🤖 AI Agent Security

MEDUSA provides industry-leading AI security scanning with 9,600+ detection patterns for the agentic AI era. Updated for OWASP Top 10 for LLM Applications 2025 and includes detection for 200+ CVEs across AI coding editors and MCP servers.

Full AI Security Documentation

AI Security Coverage

Category Patterns Detects
Prompt Injection 800+ Direct/indirect injection, jailbreaks, role manipulation
MCP Server Security 400+ Tool poisoning, schema poisoning, ATPA, sampling injection, rug-pull
Repo Poisoning 150+ Weaponized AI editor configs, Clinejection, CurXecute, IDEsaster, CamoLeak
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, lock file backdoors
Traditional SAST 1,400+ SQL injection, XSS, command injection, secrets

AI Attack Coverage

Context & Input Attacks

  • Prompt injection patterns
  • Role/persona manipulation
  • Hidden instructions
  • Obfuscation tricks

Memory & State Attacks

  • Memory poisoning
  • Context manipulation
  • Checkpoint tampering
  • Cross-session exposure

Tool & Action Attacks

  • Tool poisoning (CVE-2025-6514)
  • Command injection
  • Tool name spoofing
  • Confused deputy patterns

Workflow & Routing Attacks

  • Router manipulation
  • Agent impersonation
  • Workflow hijacking
  • Delegation abuse

RAG & Knowledge Attacks

  • Knowledge base poisoning
  • Embedding pipeline attacks
  • Source confusion
  • Retrieval manipulation

Advanced Attacks

  • HITL bypass techniques
  • Semantic manipulation
  • Evaluation poisoning
  • Training data attacks

Supported AI Files (28+)

# Critical - Known RCE vectors
.cursorrules              # Cursor AI (CVE-2025-54135)
.cursor/rules/*.mdc       # Cursor rules directory
.cursor/mcp.json          # Cursor MCP (CurXecute RCE)
.clinerules/*.md          # Cline (Clinejection)
.windsurfrules            # Windsurf (CVE-2025-36730)
.windsurf/rules/*         # Windsurf workspace rules
.codex/config.toml        # Codex CLI (CVE-2025-61260)
.kiro/settings/mcp.json   # Kiro (CVE-2026-0830)
.vscode/settings.json     # VS Code (IDEsaster)
*.code-workspace          # VS Code workspace
mcp.json / .mcp.json      # MCP server configs

# High - AI instruction files
CLAUDE.md                 # Claude Code
GEMINI.md                 # Gemini CLI
AGENTS.md                 # OpenAI Codex
AGENT.md                  # Roo Code
SKILL.md                  # ClawHub/ToxicSkills
CONVENTIONS.md            # Aider
.github/copilot-instructions.md  # GitHub Copilot
.amazonq/rules/*.md       # Amazon Q Developer
.augment/rules/*          # Augment Code
.roo/rules/*.md           # Roo Code
.tabnine/guidelines/*.md  # Tabnine
.continue/config.yaml     # Continue.dev
.cody.yml                 # Sourcegraph Cody

Quick AI Security Scan

# 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)

🎮 Usage

Basic Commands

# 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

Install Commands

# 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 --debug

Note: 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.

Init Commands

# 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

Additional Commands

# 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

Scan Options Reference

Option Description
TARGET Directory or file to scan (default: .)
-g, --git URL Clone and scan a remote git repo (GitHub URL or user/repo shorthand)
-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

Install Options Reference

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 --all flag is deprecated. Install external linters via your system package manager if needed.


âš™ī¸ Configuration

.medusa.yml

MEDUSA uses a YAML configuration file for project-specific settings:

# MEDUSA Configuration File
version: 2026.5.5

# 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 speed

Generate Default Config

medusa init

This creates .medusa.yml with sensible defaults and auto-detects your IDE.


🤖 IDE Integration

MEDUSA supports 5 major AI coding assistants with native integrations. Initialize with medusa init --ide all or select specific platforms.

Supported 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

Quick Setup

# Setup for all IDEs (recommended)
medusa init --ide all

# Or select specific platforms
medusa init --ide claude-code --ide gemini-cli

Claude Code

What 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

Gemini CLI

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 tools

OpenAI Codex

What it creates:

  • AGENTS.md - Project context (root level)

Usage:

Ask: "Run a security scan"
Codex: *executes medusa scan .*

GitHub Copilot

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

Cursor

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

🔧 Advanced Features

System Load Monitoring

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)

Smart Caching

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!

Parallel Processing

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

📊 Example Workflow

New Project Setup

# 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/79 scanners
   Missing: 73 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!

CI/CD Integration

# .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 high

Note: No tool installation step needed - MEDUSA's 9,600+ built-in rules work immediately.


đŸ—ī¸ Architecture

Scanner Pattern

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(...)

Auto-Registration

Scanners automatically register themselves:

# medusa/scanners/__init__.py
registry = ScannerRegistry()
registry.register(PythonScanner())
registry.register(JavaScriptScanner())
# ... all 79 scanners

Severity Mapping

Unified 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

đŸ§Ē Testing & Quality

Dogfooding Results

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 (79 scanners)

Performance Benchmarks

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.


đŸ—ēī¸ Roadmap

✅ Completed (v2026.5.0)

  • medusa scan --git <URL> - Scan any GitHub repo for AI supply chain attacks
  • Repo Poisoning Detection - 45 new rules for Clinejection, CurXecute, IDEsaster, CamoLeak, ToxicSkills
  • 28+ AI Editor Config Detection - Priority file scanning across 15+ AI coding tools
  • MCP Advanced Attacks - Schema poisoning, ATPA, sampling injection, cross-server manipulation
  • 9,600+ Detection Patterns - Industry-leading AI security coverage
  • 78 Specialized Analyzers - Comprehensive language and platform coverage
  • 133 Critical CVEs - CVEMiner database for known vulnerability scanning
  • 583 FP Filter Patterns - 97.7% false positive reduction rate on real-world projects
  • 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

🔮 Upcoming

  • 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

🤝 Contributing

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-feature

Adding New Scanners

See docs/development/adding-scanners.md for a guide on adding new language support.


📜 License

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


Coming Soon

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 (9,600+ 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.


🙏 Credits

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)

📖 Guides


📞 Support


📈 Statistics

Version: 2026.5.5 Release Date: 2026-04-03 Detection Patterns: 9,600+ AI security rules Analyzers: 79 specialized scanners FP Filter Patterns: 514 intelligent filters (96.8% reduction rate) CVE Coverage: 200 critical vulnerabilities (37+ AI editor CVEs) Repo Poisoning: 28+ AI editor config file types detected 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


🌟 Why MEDUSA?

vs. Bandit

  • ✅ 9,600+ patterns (not just Python security)
  • ✅ AI/ML security coverage
  • ✅ Zero setup required
  • ✅ IDE integration

vs. SonarQube

  • ✅ Simpler setup (pip install && scan)
  • ✅ No server required
  • ✅ AI-first security focus
  • ✅ Free and open source

vs. Semgrep

  • ✅ AI/ML-specific rules built-in
  • ✅ MCP, RAG, agent security
  • ✅ Better IDE integration
  • ✅ No rule configuration needed

vs. Traditional SAST

  • ✅ 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-04-03 Status: Production Ready Current Version: v2026.5.5 - Security Hardening

Release History

VersionChangesUrgencyDate
v2026.5.11## \`medusa scan --git\` hotfix + 54-test ship gate suite ### Fixed - **\`medusa scan --git\` crashed on every invocation** — Every \`medusa scan --git <repo>\` in v2026.5.10 failed immediately with \`NameError: name 'include_user_mcp_configs' is not defined\` before scanning a single file. \`_scan_git_repo()\` was missing the parameter in both its function signature and the call site. Two-line fix. ### Tests added - **\`TestScanGitRepoRegression\`** (\`tests/test_git_scan.py\`) — locks in tHigh5/28/2026
v2026.5.10## Security hardening patch — five fixes from external security review ### Fixed - **VS Code extension command injection** — `exec()` replaced with `execFile` throughout `scanner.ts`. Binary path and args passed as argv array, never interpolated into a shell string. Shell metachar validation added on `medusaPath` (rejects `;|&\`$()<>`). - **`--fail-on` ignored cached findings** — `total_issues` now counts cached scan results. Previously a re-scan with `--fail-on high` would silently pass if fiHigh5/24/2026
v2026.5.8# v2026.5.8 — `medusa secrets` > **Your PyPI token might be in your Claude chat history right now.** > v2026.5.8 ships the tool to find it — and the tool to fix it. ## The headline Developers paste credentials into AI assistants every day. The assistants keep those conversations in plaintext on disk. Anyone with read access to `$HOME` can harvest production secrets in seconds. **`medusa secrets scan`** finds them. **`medusa secrets purge`** cleans them up. ```bash $ medusa secrets scan ..High5/20/2026
v2026.5.7## What's New in v2026.5.7 ### New Features | | Feature | Details | |---|---|---| | đŸ•ĩī¸ | **Indirect PI Rules (101/102)** | 50 new patterns for **social authority injection** and **covert action concealment** — adversarial attack patterns used to manipulate AI agents without triggering obvious injection keywords | | đŸ“Ļ | **Supply Chain Import Scanner** | Detects malicious package names in dependency manifests (npm, pypi, go, cargo, maven) without requiring CVE version matching. Rules with `fixHigh5/13/2026
v2026.5.5# MEDUSA v2026.5.5 — Security Hardening Patch release addressing 8 findings from a red-team review of the MEDUSA scanner codebase. No CVEs are disclosed against earlier versions — these are defense-in-depth improvements. ## What changed ### Argument injection defense (C-1) A malicious repo containing a file literally named `--config=https://evil.tld/rce.yaml` would previously have had the filename re-parsed as an option by semgrep and trivy, causing them to fetch attacker-controlled rule YAMHigh4/18/2026
v2026.5.4# MEDUSA v2026.5.4 — FP Patterns YAML Refactor ## Summary Pure refactor release. Moves 583 false positive filter patterns from a 6,746-line Python file (`medusa/core/fp_patterns_db.py`) into 27 per-scanner YAML files under `medusa/core/fp_patterns/`. Zero behavior change — the regression benchmark produces byte-identical findings. ## Why - **Data/logic separation.** FP patterns were data masquerading as Python code. YAML is the right format for data. - **Editable without a Python diff.** ConHigh4/16/2026
v2026.5.3## CVE Database Update Updated CVEMiner database to 2026-04-08 build. | | Previous | Now | |--|--|--| | CVEs | 200 | **184 + 125 critical = 309 total** | | Generated | 2026-03-18 | **2026-04-08** | ### Install / Upgrade ```bash pip install --upgrade medusa-security ```High4/8/2026
v2026.5.2## Security Hardening Release This release patches **16 security and bug findings** identified through a multi-agent review (Sentinel, Skeptic, Architect, and Codex). All 289 tests pass. Tested on Linux, macOS, and Windows. ### 🔐 Security Fixes | Severity | Fix | File | |----------|-----|------| | HIGH | Auth tokens in \`--git\` URLs stripped from **all** console/log output before printing | \`cli.py\` | | HIGH | Stored XSS — HTML report fields now escaped with \`html.escape()\` | \`reporterMedium4/3/2026
v2026.5.1## Bug Fixes in v2026.5.1 ### 🔴 Critical - **`--fail-on` severity filtering** — was counting ALL issues regardless of severity level. `--fail-on critical` now correctly exits non-zero only when CRITICAL issues are found. Previously it would exit on any LOW finding and falsely report "Found N issues at CRITICAL+ level". - **`medusa init` next steps** — was recommending deprecated `medusa install --all` (does nothing). Now correctly shows `medusa install --ai-tools`. ### 🟠 High - **`.env` doMedium4/3/2026
v2026.5.0## What's New in v2026.5.0 ### 🤖 9,600+ AI Security Patterns Up from 7,300 in v2026.4.0 — comprehensive coverage for AI/ML, agents, MCP servers, RAG pipelines, and prompt injection. ### 🚨 200 CVEs (CVEMiner v2.0) Expanded CVE database covering AI coding editors, MCP servers, and supply chain attacks. Up from 133. ### đŸĒŸ Windows PATH Auto-Fix Automatically detects and repairs missing PATH entries on Windows install — no more manual `$env:PATH` edits. ### 🔧 79 Scanner Categories Wired Full Medium4/3/2026
v2026.4.0## What's New ### `medusa scan --git <URL>` — Scan Any Repo for AI Supply Chain Attacks Scan any GitHub repository for weaponized AI editor configs, prompt injection payloads, and MCP tool poisoning with a single command: ```bash pip install medusa-security medusa scan --git user/repo ``` MEDUSA automatically detects **28+ AI editor config files** that are known attack vectors across 15+ AI coding tools — Cursor, Cline, Copilot, Claude Code, Gemini CLI, Kiro, Codex CLI, Windsurf, Amazon Q, RLow3/13/2026
v2026.3.2.0## MEDUSA v2026.3.2.0 - 4,000+ Detection Rules MEDUSA has crossed the **4,000+ detection pattern milestone** with this release. This update delivers 335 net-new AI security scanner rules extracted from the latest PaperMiner research batch, covering cutting-edge attack techniques from peer-reviewed AI security papers. ### New Scanner Rule Files (12 new YAML files) **AI Security** (`medusa/rules/ai_security/`) - `jailbreaking_scanner.yaml` — 143 rules (JUMP++, CL-GSO, AutoDAN, GCG variants) - `Low2/24/2026
v2026.3.1.0## CVEMiner Update — 32 New AI/ML CVEs ### New CVE Detections (+32) **vLLM (CRITICAL/HIGH)** - CVE-2026-22778 — RCE - CVE-2026-24779 — Server-Side vulnerability - CVE-2026-22807 — RCE - CVE-2025-9141 — Remote code execution - CVE-2025-32444 — RCE (CRITICAL) - CVE-2024-9052, CVE-2024-9053, CVE-2024-11041, CVE-2025-29783 — Deserialization RCE **Keras (CRITICAL/HIGH)** - CVE-2025-12060, CVE-2025-12058 — Directory traversal - CVE-2025-49655 — Framework vulnerability (CRITICAL) - CVE-2025-9905, Low2/19/2026
v2026.3.0## What's New in v2026.3.0 **Scanner Precision + FP Tuning** — Compound scanner gates, attribution fix, and 508 FP filters. ### Fixed - **Scanner Attribution Bug** — Parallel scan findings now correctly attributed to originating scanner (was all assigned to first scanner per file) - **SteganographyScanner FPs** — Compound gate: requires BOTH input handler AND AI keyword indicators - **LLMGuardScanner FPs** — Toxicity check now requires actual LLM API call patterns before firing - **MCPServerScLow2/16/2026
v2026.2.3## MEDUSA v2026.2.3 - Performance Overhaul + Launch Ready Two months of work culminating in the launch-ready release. ### Performance (52% faster scans) - **Single-pass file discovery** — 57 separate `rglob()` calls replaced with one `os.walk()` traversal - **Scanner pre-mapping cache** — first 8KB of each file read once, shared across all scanners - **Pre-compiled regex patterns** — FP filter and OWASP scanner patterns compiled at class level - **Live progress fix** — chunksize capped at 8 fLow2/15/2026
v2025.9.1.1## What's Changed ### Added - **10 Content-Based FP Detection Rules** - New patterns to reduce false positives on non-secret content: - `masked_asterisks` - 10+ asterisks indicate redacted values (95% confidence) - `crlf_line_ending` - Windows line endings / ShellCheck SC1017 (90%) - `html_encoded_mask` - HTML-encoded masked values in reports (92%) - `sentry_dsn` - Sentry DSNs are public by design (90%) - `example_marker` - Values marked as example/sample/test/mock (92%) - `placeholLow1/15/2026
v2025.9.1.0## What's Changed ### Fixed - **Multi-scanner architecture**: Now runs ALL matching scanners per file (language + SAST + secrets + AI) instead of just highest confidence - **Issue deduplication**: Prevents duplicate findings across multiple scanners - **Path import bug**: Fixed `UnboundLocalError` in install command - **SQLScanner venv detection**: Now properly detects sqlfluff in virtual environment - **FP filter NoneType bug**: Fixed comparison error when line number is None ### Added - **DoLow1/11/2026
v2025.9.0.14## What's Changed ### Fixed - **pyproject.toml** - Fixed corrupted `tool.ruff` and `tool.mypy` settings that had package version instead of Python version ## Installation ```bash pip install --upgrade medusa-security ```Low1/10/2026
v2025.9.0.13## Bug Fix Fixes .template/.example file discovery for secret scanning. ### The Bug `FILE_SCANNERS` in `parallel.py` was missing extensions that GitLeaksScanner supports. This caused files like `.templates/env.template` (common in Docker homelab configs) to be completely skipped during scanning. ### Fix Added these extensions to file discovery: - `.template`, `.tpl`, `.example`, `.sample`, `.dist` - `.ini`, `.cfg`, `.conf`, `.toml` ### Impact Docker homelab projects with example/template Low1/10/2026
v2025.9.0.12## CRITICAL Bug Fix **MEDUSA v2025.9.0.12** - Fixes a critical bug that broke ALL 40+ scanners ### The Bug A Windows PATH workaround introduced in v0.11.2 (Nov 19, 2025) caused all scanners to silently fail when tools were in the installation cache. Scanners returned 0 findings with no error message. **Root cause:** `_find_tool()` returned a dummy path `<cached:toolname>` instead of the real executable path. **Impact:** Any user who installed tools via MEDUSA had non-functional scans for ~2Low1/10/2026
v2025.9.0.11## What's New in v2025.9.0.11 ### Enhanced False Positive Filter New directory-based FP detection patterns: - **Example directories**: `examples/`, `samples/`, `demos/`, `tutorials/` - **Tools directories**: `tools/`, `scripts/`, `utils/`, `helpers/` - **Test resources**: `src/test/resources/` for Java/Kotlin projects ### Cleaner PyPI Page - Simplified README intro for better rendering - Consistent scanner count (74) across all documentation - Updated tagline highlighting key features ## InstLow1/9/2026
v2025.9.0.9## What's Changed ### Fixed - **README Scanner Count** - Updated all references from 64 to 73 scanners - **AI Rules Count** - Updated from 50+ to 180+ rules throughout documentation - **pyproject.toml** - Fixed corrupted tool.ruff and tool.mypy Python version settings ### v2025.9.0.8 - **PyPI Metadata Update** - Updated package description and keywords - New description: "AI-first security scanner with 73+ analyzers, intelligent false positive reduction, and 180+ AI agent security rules" -Low1/5/2026
v2025.9.0.6## 🔒 Security Updates ### CVE-2025-6514 MCP-Remote RCE Scanner (v2025.9.0.6) - New `MCPRemoteRCEScanner` for detecting vulnerable mcp-remote package - **CVE-2025-6514**: Critical OS command injection (CVSS 9.6) - Detects vulnerable versions 0.0.5-0.1.15 in package.json, lockfiles - Scans Claude Desktop config for vulnerable MCP server configurations ### Intelligent False Positive Filter (v2025.9.0.5) - New `fp_filter.py` module reduces noise in scan results - Context-aware filtering for commoLow1/3/2026
v2025.9.0.0## Major Release: 6 New Research-Driven Security Scanners **MEDUSA now includes 70 independent security scanner implementations with 180+ AI-specific detection rules.** ### 🆕 New Scanners #### 🔐 PostQuantumScanner (PQC001-PQC010) Quantum-vulnerable cryptography detection - **first open-source scanner for PQC readiness** - RSA, ECDSA, ECDH, Diffie-Hellman flagged as quantum-vulnerable - Classical key sizes detected (RSA-2048, P-256 curves) - Crypto-agility anti-patterns identified - RecommenLow12/15/2025
v2025.8.5.12## 🎉 Major Release: Zero False Positives from Dependencies This release fixes a critical issue where users were seeing **2500+ false positives** from pip-installed packages in their virtual environments. Now MEDUSA only scans YOUR code, not third-party dependencies. ### ✨ Highlights - **Zero False Positives** - Virtual environments and pip packages are now automatically excluded - **Smart Config Merging** - User exclusions merge with mandatory exclusions (instead of replacing) - **Auto-DetecLow12/11/2025
v2025.8.5.11## What's New ### Professional HTML Report Redesign - **Complete redesign** - Clean, professional dark theme (no more childish animations) - **Pantheon Security branding** - Cyan (#00CED1), dark blue, electric green colors - **Fixed severity counters** - Issue counts now properly add up - **Dynamic version** - Shows current MEDUSA version in report - **Mobile responsive** - Works on all screen sizes - **Security hardened** - Proper HTML escaping for all content ### Scanner Regex Fixes (v2025.8Low12/10/2025
v2025.8.5.5## 🚨 React2Shell CVE Detection (CVSS 10.0) This release adds automatic detection for **CVE-2025-55182 "React2Shell"** - a critical RCE vulnerability affecting React Server Components and Next.js. ### What's New - **React2ShellScanner** - New scanner detecting vulnerable React/Next.js versions - **urllib3 CVE fixes** - Updated to 2.6.0+ (CVE-2025-66418, CVE-2025-66471) - **64 total scanners** - Up from 63 ### Vulnerable Versions Detected | Package | Vulnerable | Fixed | |---------|---------Low12/7/2025
v2025.8.5.4# 🐍 MEDUSA v2025.8.5.4 **Universal security scanner with 63 specialized analyzers for all languages and platforms.** ## 🚀 What's New ### 🤖 AI/LLM Security Tools Integration - **ModelScan** - Detect malicious ML models (pickle attacks, unsafe deserialization) - **Garak** - LLM vulnerability probing (prompt injection, jailbreaks, data leakage) - **LLM Guard** - Input/output sanitization (PII detection, toxicity, secrets) ### 📊 63 Scanners Total - 45 language/framework scanners - 18 AI/LLM Low11/29/2025
v2025.8.0.0# 🧠 AI Security Powerhouse Release **MEDUSA v2025.8.0.0** doubles down on AI security with **OWASP Top 10 for LLM 2025** compliance, **CVE-2025-6514** detection, and comprehensive documentation. ## 🆕 What's New Since v2025.7 ### OWASP Top 10 for LLM Applications 2025 Updated `OWASPLLMScanner` to the **November 2024 release** of OWASP standards: | Category | Status | Description | |----------|--------|-------------| | **LLM07** | 🆕 NEW | System Prompt Leakage - credentials/secrets in prompLow11/28/2025
v2025.7.0.0# 🤖 AI Agent Security Release **MEDUSA v2025.7.0.0** introduces **industry-leading AI agent security scanning** with 50+ detection rules for the agentic AI era. ## 🆕 New AI Security Scanners | Scanner | Rules | Detects | |---------|-------|---------| | **AI Context Scanner** | AIC001-030 | Prompt injection, HITL bypass, semantic attacks, training poisoning | | **Agent Memory Scanner** | AIM001-010 | Memory poisoning, insecure storage, checkpoint tampering | | **RAG Security Scanner** | AIR0Low11/27/2025
v2025.3.0.0## What's New in v2025.3.0.0 ### 🔒 IDE Config Backup System - Automatic backup of IDE configuration files before modifications - New `medusa backup --list` command to view backups - New `medusa backup --restore-latest` command to restore - Supports VS Code, Cursor, and Claude Code configs ### 🐛 Bug Fixes - Fixed Windows compatibility for npm/pip version detection - Added missing ToolMapper import ### đŸ“Ļ Installation ```bash pip install medusa-security ``` ### 🔗 Links - [Website](https://pLow11/27/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

secure-claude-codeSecurity guardrails for Claude Code, MCP tools, and Claude cowork workflows. Local-first modular YARA-style guard packs for secrets, exfiltration, prompt injection, MCP abuse, and risky agent actions.v15.0.0
AI-Infra-GuardA full-stack AI Red Teaming platform securing AI ecosystems via OpenClaw Security Scan, Agent Scan, Skills Scan, MCP scan, AI Infra scan and LLM jailbreak evaluation.v4.1.11
opena2aOpen-source security tools for AI agents. Find vulnerabilities, fix root causes, prove compliance.v0.10.7
OpenACMSelf-hosted autonomous AI agent — runs on your PC, controls your environment, connects to any MCP server.main@2026-06-02
agent-bomOpen security scanner for AI supply chain: agents, MCP, containers, cloud, GPU, and runtime with blast-radius analysis.v0.88.5

More in MCP Servers

claude-plugins-officialOfficial, Anthropic-managed directory of high quality Claude Code Plugins.
langchain4jLangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes impleme
hyperframesWrite HTML. Render video. Built for agents.
claude-code-guideClaude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!