MEDUSA integrates with popular AI-powered IDEs to provide intelligent security scanning with automatic false positive detection.
| IDE | Context File | Commands | AI FP Detection |
|---|---|---|---|
| Claude Code | CLAUDE.md | /medusa-scan, /medusa-install |
✅ Full |
| Gemini CLI | GEMINI.md | /medusa-scan, /medusa-install |
✅ Full |
| GitHub Copilot | .github/copilot-instructions.md | Manual | ✅ Guided |
| OpenAI Codex | AGENTS.md | Manual | ✅ Guided |
| Cursor | .cursor/mcp.json + CLAUDE.md | /medusa-scan |
✅ Full |
Run this command in your project root:
medusa initThis creates all necessary configuration files for detected IDEs.
project/
├── CLAUDE.md # Project context with FP handling
├── .claude/
│ ├── agents/medusa/
│ │ └── agent.json # Agent configuration
│ └── commands/
│ ├── medusa-scan.md # Scan command
│ └── medusa-install.md # Install command
Run a security scan:
/medusa-scan
Quick scan (cached):
/medusa-scan --quick
Install missing tools:
/medusa-install
Claude Code reads CLAUDE.md and automatically:
- Identifies likely false positives (B404, B603, B607, B101)
- Highlights real security issues
- Suggests creating
.banditconfig for project-wide FP handling - Provides fix suggestions for real vulnerabilities
You: /medusa-scan
Claude: Running MEDUSA security scan...
Found 45 findings. After intelligent triage:
**False Positives (43):** Subprocess usage in CLI tool - expected
**Real Issues (2):**
1. HIGH: api/auth.py:156 - SQL query built with string concatenation
Fix: Use parameterized query with SQLAlchemy
2. MEDIUM: config.py:23 - Debug mode enabled
Fix: Use environment variable for DEBUG setting
Shall I create a `.bandit` config to suppress the FPs?
project/
├── GEMINI.md # Project context
├── .gemini/
│ └── commands/
│ ├── medusa-scan.toml # Scan command
│ └── medusa-install.toml # Install command
# In Gemini CLI
/medusa-scan
/medusa-installThe /medusa-scan command includes a 4-step triage process:
- Identify False Positives - Known FP patterns
- Identify Real Issues - Actual vulnerabilities
- Report Summary - Filtered results
- Handle FPs - Suggest
.banditconfig
project/
├── .github/
│ └── copilot-instructions.md # Copilot context
Copilot reads copilot-instructions.md and applies the rules when:
- Suggesting code completions
- Reviewing security scan results
- Answering questions about security
The file teaches Copilot:
- Security patterns to avoid (SQL injection, XSS, etc.)
- How to recognize false positives
- When to suggest running
medusa scan . - How to handle FPs with
.banditconfig
project/
├── AGENTS.md # Codex context
- Security requirements
- Common FP patterns with explanations
- Table of Bandit rules and when they're FPs
- How to create
.banditconfig
Cursor uses both Claude Code and MCP (Model Context Protocol):
project/
├── CLAUDE.md # Shared with Claude Code
├── .claude/ # Shared commands
├── .cursor/
│ └── mcp.json # MCP server config
The mcp.json configures MEDUSA as an MCP server:
{
"mcpServers": {
"medusa-security": {
"command": "medusa",
"args": ["mcp-server"]
}
}
}Edit the generated context file (e.g., CLAUDE.md) to add:
## Project-Specific Security Rules
- All API endpoints must validate JWT tokens
- Database queries must use the ORM, never raw SQL
- File uploads must be scanned for malwareMEDUSA's init command won't overwrite existing context files. Your customizations are safe.
To regenerate (and overwrite):
medusa init --forceEdit .claude/agents/medusa/agent.json:
{
"triggers": {
"file_save": {
"enabled": true,
"patterns": ["*.py", "*.js", "*.ts"]
}
},
"settings": {
"auto_scan": true,
"inline_annotations": true
}
}Set in .medusa.yml:
ide:
claude_code:
enabled: true
auto_scan: false- Use
/medusa-scan --quickfor fast feedback during development - Ask Claude to explain findings: "What does B602 mean?"
- Request fixes: "Fix the SQL injection in auth.py"
- The scan command includes detailed triage steps
- Gemini will suggest
.banditconfig when seeing many FPs
- Copilot applies security rules when suggesting code
- After completing code, it may suggest running a scan
- Ask: "Is this code secure?" for instant review
- Works like Claude Code with additional MCP capabilities
- Can run scans through MCP protocol
- Shares context files with Claude Code
# Regenerate IDE files
medusa init --force
# Check files were created
ls -la .claude/ .gemini/ .github/ .cursor/Ensure the context file is in the project root:
- CLAUDE.md (not .claude/CLAUDE.md)
- GEMINI.md (not .gemini/GEMINI.md)
Create .bandit config as described in Handling False Positives.
# Verify MEDUSA is installed
medusa --version
# Verify it's in PATH
which medusa