Pantheon-Security/medusa
MEDUSA is an AGPL-3.0 CLI security scanner (pip install medusa-security) built specifically for the AI/agentic era, shipping 40,000+ detection patterns across 79 scanner types for AI/ML apps, MCP servers, RAG pipelines, and traditional code, with zero external tool installation required. It detects AI supply-chain attacks like repo poisoning through weaponized editor configs (Cursor, Cline, Windsurf, Claude Code, Copilot, Kiro), MCP tool/schema poisoning, and prompt injection, and includes a `medusa secrets scan/purge` command that finds and redacts leaked API keys (21 issuer types) inside Claude Code, Cursor, Copilot, Gemini and shell REPL history files. It also carries a CVE database (200 entries) covering things like Log4Shell, XZ Utils, LangChain RCE, and the CVSS 10.0 React2Shell (CVE-2025-55182) RCE in React Server Components/Next.js.
What it is
Despite the catalog summary describing the Foofus/Medusa parallel login brute-forcer, the fetched page is a different tool that shares the name: MEDUSA, an "AI-first" security scanner distributed via pip. It ships 40,000+ detection patterns aimed at AI/ML code, LLM agents, MCP servers, and RAG pipelines, plus 200 CVE detections (Log4Shell, Spring4Shell, XZ Utils, LangChain RCE, MCP-Remote RCE, React2Shell). If you came here expecting the credential brute-forcer, this is not it — verify which tool you are actually pulling.
What it does
The two genuinely actionable capabilities, beyond the marketing feature list:
- Repo / supply-chain scanning —
medusa scan --git <URL>scans a GitHub repo for AI supply-chain attacks: repo poisoning, prompt injection, and MCP tool poisoning, including weaponized AI-editor configs across 28+ file types (Cursor, Cline, Copilot, Claude Code, Gemini, Kiro). - Leaked-secret scanning of AI/shell histories —
medusa secrets scangreps AI-assistant chat logs (Claude Code, Cursor, Copilot, Zed, Gemini) and shell histories (bash, zsh, fish, psql, mysql, python REPL) for credentials that developers paste into assistants. It recognizes 21 issuer types (Anthropic, OpenAI, PyPI, GitHub PATs, AWS, GCP, Stripe, Slack). The threat model the page names: those conversations sit in plaintext under$HOME, so anyone with read access — or later malware — can harvest live production keys.
What to do
medusa secrets scan # everything (chat + shell)
medusa secrets scan --source ai-chats # AI assistants only
medusa secrets scan --source shell # ~/.bash_history, ~/.zsh_history, fish, psql, mysql
medusa secrets scan --path FILE # explicit file (e.g. a ChatGPT export)
medusa secrets scan --reveal # show real values (requires 'I UNDERSTAND')
medusa secrets purge # interactive [y/n/s/a/q] redactionPurge writes a byte-identical backup before any change, keeps JSONL parseable, and tags each redaction with a unique per-run marker ([REDACTED-MEDUSA-...-<run-id>]). It is local-only with no telemetry.
Caveats
- This is vendor self-description on a project page; the pattern counts (40,000+, "10-40x faster"), CVE coverage, and false-positive hardening are unverified claims, not third-party results.
- The 40,000+ patterns are stated to be "harvested from 8,466 AI-security research papers" — coverage breadth, not tested detection quality.
- Name collision is the real hazard here: confirm you are installing the intended
medusa, since the catalog entry points at the wrong tool.
Organisations named here
- AIShellJack
- ToxicSkills
- xz-utils
CVEs named here
- CVE-2025-54135
- CVE-2025-64660
- CVE-2025-36730
- CVE-2025-61260
- CVE-2026-0830
- CVE-2025-55182
Technologies named here
- MEDUSA
- React 19.0.0 - 19.2.0
- Next.js 15.0.0 - 15.0.4
- medusa secrets scan/purge
- ModelScan
- Various canary/rc releases of React/Next.js
- Bandit
- Cursor AI
- Cline
- ESLint
- Windsurf
- ShellCheck
- Semgrep
- Codex CLI
- Trivy
- Kiro
- VS Code
- Gitleaks
- SonarQube
- MCP server configs
- MegaLinter
- Claude Code
- Gemini CLI
- OpenAI Codex
- Roo Code
- ClawHub/ToxicSkills
- Aider
- GitHub Copilot
- Amazon Q Developer
- Augment code
- Tabnine
- Continue.dev
- Sourcegraph Cody
- Log4j
- Spring Framework
- XZ Utils
- LangChain
- mcp-remote
- Python
- PyPI
- Model Context Protocol
- Cursor
- GitHub Actions
- SARIF
Techniques named here
- Prompt Injection
- Tool shadowing
- Knowledge base/RAG injection
- MCP tool poisoning
- Dataset poisoning
- Code-level prompt injection
- Credential harvesting from AI chat/shell history files
- Dangerous MCP config path
- Agent Protocol Security attacks
Threat actors named here
- Clinejection
- CurXecute
- IDEsaster
- ToxicSkills
- CamoLeak
- RoguePilot
- AIShellJack
- Cacheract
- Log4Shell
- Spring4Shell
- XZ Utils backdoor
- LangChain RCE
- MCP-Remote RCE
Related in AI Security
