Skip to content
medusa-security logo

Medusa Security Skill

medusa-security

AI-first security scanning with Medusa. 3,000+ detection patterns covering AI/ML, agents, MCP, RAG, prompt injection, and traditional SAST vulnerabilities. Wraps Medusa CLI with SARIF/JSON parsing, structured finding output, OWASP mapping, and remediation guidance.

oimiragieo/agent-studio0installs43stars

SKILL.md

Full skill instructions

Medusa Security Skill

Identity

AI-first security scanner integration skill. Leverages Medusa's 76 scanners and 3,000+ detection patterns for comprehensive security analysis including AI/​ML-specific vulnerability detection.

Capabilities

  1. Full Scan — All 76 scanners, comprehensive security analysis
  2. AI-Only Scan — Prompt injection, MCP security, agent security, RAG security
  3. Quick Scan — Git-changed files only for rapid development feedback
  4. Targeted Scan — Specific scanner categories (mcp, secrets, prompt-injection, etc.)
  5. SARIF Output Parsing — Standard SARIF v2.1.0 structured findings
  6. JSON Output Parsing — Medusa-native JSON format
  7. OWASP Mapping — Maps findings to OWASP Agentic AI (ASI01-10) and OWASP Top 10 (A01-10)
  8. Remediation Guidance — Links findings to agent-studio skills and agents
  9. CI/​CD Integration — Fail-on thresholds, SARIF upload for GitHub Code Scanning

Prerequisites

Python 3.10+
pip install medusa-security

Check installation: python -m medusa --version

Workflow: Full Security Scan

# Step 1: Verify installation
python -m medusa --version

# Step 2: Run scan
medusa scan . --format sarif --fail-on high

# Step 3: Parse output (use scripts/​main.cjs)
node .claude/​skills/​medusa-security/​scripts/​main.cjs --mode full --target .

# Step 4: Review findings by severity
# CRITICAL → immediate fix required
# HIGH → fix before release
# MEDIUM → fix in next sprint
# LOW → track and address

Workflow: AI-Only Scan

medusa scan . --format sarif --ai-only

Scans only: prompt injection (800+ patterns), MCP security (400+ patterns), agent security (500+ patterns), RAG security (300+ patterns).

Workflow: Quick Scan (Development)

medusa scan . --format sarif --quick

Only scans git-changed files. Use during development for rapid feedback.

Workflow: Targeted Scan

# MCP security only
medusa scan . --format sarif --scanners mcp-server,mcp-config

# Secrets only
medusa scan . --format sarif --scanners secrets,gitleaks,env

# AI context files only
medusa scan . --format sarif --scanners ai-context

Output Processing

The skill uses helper scripts located at .claude/​skills/​medusa-security/​scripts/:

ScriptPurpose
sarif-parser.cjsParses SARIF v2.1.0 output
json-parser.cjsParses Medusa JSON output
finding-formatter.cjsFormats findings with OWASP mapping
main.cjsOrchestrates the full pipeline
cli-wrapper.cjsWraps Medusa CLI invocation
security-review.cjsDeterministic report writer (no Glob recursion)

Using the Pipeline

# Full scan with structured output
node .claude/​skills/​medusa-security/​scripts/​main.cjs --mode full --target .

# AI-only scan
node .claude/​skills/​medusa-security/​scripts/​main.cjs --mode ai-only --target .

# Quick scan (git-changed files)
node .claude/​skills/​medusa-security/​scripts/​main.cjs --mode quick --target .

Deterministic Security Review (Recommended in Claude sessions)

Use this when you need the final security review report and want to avoid recursive Glob timeouts:

node .claude/​skills/​medusa-security/​scripts/​security-review.cjs

This writes:

/​.claude/​context/​reports/​security/​security-review-medusa-scan-2026-02-17.md

and performs fixed-path checks on:

  • .claude/​hooks/
  • .claude/​lib/
  • .claude/​skills/​medusa-security/​scripts/
  • .claude/​CLAUDE.md

Important Runtime Guardrail

  • Avoid recursive glob patterns like .claude/​skills/​medusa-security/​**/​* in long sessions.
  • Prefer direct file reads and deterministic script entry points.

OWASP Mapping

Findings are automatically mapped to:

  • OWASP Agentic AI Top 10 (ASI01-10): Goal Hijacking, Tool Misuse, Context Poisoning, etc.
  • OWASP Top 10 (A01-10): Broken Access Control, Injection, Cryptographic Failures, etc.

Severity Triage

SeverityActionTimeline
CRITICALImmediate fixBefore any merge
HIGHFix before releaseSame sprint
MEDIUMFix in next sprintNext cycle
LOWTrack and addressBacklog

Agent Integration

AgentUsage
security-architectPrimary consumer. Use for comprehensive security reviews.
penetration-testerUse for targeted vulnerability scanning with authorization.
code-reviewerUse AI-only scan as part of code review workflow.

CI/​CD Integration

# GitHub Actions example
- name: Security Scan
  run: |
    pip install medusa-security
    medusa scan . --format sarif --fail-on high -o reports/
- name: Upload SARIF
  uses: github/​codeql-action/​upload-sarif@v3
  with:
    sarif_file: reports/​medusa-results.sarif

Iron Laws

  1. ALWAYS verify Medusa installation before scanning — python -m medusa --version first; a missing install produces no output instead of an error, silently masking all vulnerabilities.
  2. NEVER rely on AI-only mode as the release gate — AI-only mode misses traditional SAST patterns (SQLi, XSS, path traversal); full scan covering all 76 scanners is required for release-gate decisions.
  3. ALWAYS set --fail-on high in CI/​CD pipelines — without a fail threshold, pipelines pass even when CRITICAL findings exist, creating false confidence in the security posture.
  4. NEVER skip SARIF upload to GitHub Code Scanning — local-only SARIF is lost after the build; uploading via github/​codeql-action/​upload-sarif@v3 persists findings for PR review, trend tracking, and compliance audit trails.
  5. ALWAYS fix CRITICAL and HIGH findings before merging — deploying with unresolved high-severity findings expands the attack surface and nullifies the security posture gain from scanning.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Skipping installation checkMissing Medusa produces no output, not an error — all vulnerabilities silently missedRun python -m medusa --version first; abort on non-zero exit
Using AI-only mode as a release gateAI-only misses traditional SAST patterns (SQLi, XSS, path traversal) — 76 scanners needed for full coverageUse full-scan mode for CI/​CD gates; AI-only mode for rapid dev-time feedback only
No fail-on threshold in CIPipeline passes even when CRITICAL findings exist — false confidence in security postureAlways use --fail-on high in CI pipelines; adjust to --fail-on critical for high-risk repos
Ignoring MEDIUM findingsMEDIUM findings compound into exploitable chains when combined with HIGH findingsTriage MEDIUM findings each sprint; never allow them to accumulate without a tracking issue
Not uploading SARIF to Code ScanningFindings live only in local files, lost after build — no PR-level review or trend trackingUpload SARIF via github/​codeql-action/​upload-sarif@v3 in every CI run

Memory Protocol

After scanning:

  • Record new vulnerability patterns in patterns.json
  • Log significant findings in issues.md
  • Track scan history for trend analysis
  • Use recordGotcha() for recurring false positives
const manager = require('.claude/​lib/​memory/​memory-manager.cjs');

manager.recordGotcha({
  text: 'False positive: medusa flags X pattern in Y context',
  area: 'security-scanning',
});

manager.recordPattern({
  text: 'Prompt injection found in CLAUDE.md context files',
  area: 'ai-security',
});

Related Skills

  • security-architect — Threat modeling and OWASP analysis
  • static-analysis — CodeQL and Semgrep SARIF analysis
  • semgrep-rule-creator — Create custom Semgrep rules
  • insecure-defaults — Detect hardcoded credentials
  • variant-analysis — Discover vulnerability variants

More skills from oimiragieo

cloud-devops-expert logo
oimiragieo/agent-studio

cloud-devops-expert

Cloud and DevOps expert including AWS, GCP, Azure, and Terraform

43 0
View
xlsx logo
oimiragieo/agent-studio

xlsx

Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.

43 0
View
project-analyzer logo
oimiragieo/agent-studio

project-analyzer

Automated brownfield codebase analysis with weighted keyword scoring, three-stream analysis, and design pattern recognition. Detects project type, frameworks, dependencies, architecture patterns, and generates comprehensive project profile.

43 0
View
readme logo
oimiragieo/agent-studio

readme

Use when creating, updating, or generating README and documentation files for projects and libraries

43 0
View
scientific-writing logo
oimiragieo/agent-studio

scientific-writing

Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA/AMA/Vancouver), figure...

43 0
View
android-expert logo
oimiragieo/agent-studio

android-expert

Comprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance, Material Design 3, and modern Android patterns (MVI, Clean Architecture).

43 0
View
biorxiv-database logo
oimiragieo/agent-studio

biorxiv-database

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

43 0
View
omega-gemini-cli logo
oimiragieo/agent-studio

omega-gemini-cli

Use when the user wants to use Google Gemini for analysis, large files or codebases, sandbox execution, or brainstorming. Uses headless Gemini CLI scripts (no MCP). Triggers on "use Gemini", "analyze with Gemini", "large file", "sandbox", "brainstorm with Gemini".

43 0
View
gtars logo
oimiragieo/agent-studio

gtars

High-performance toolkit for genomic interval analysis in Rust with Python bindings. Use when working with genomic regions, BED files, coverage tracks, overlap detection, tokenization for ML models, or fragment analysis in computational genomics and machine learning applications.

43 0
View
service-class-conventions logo
oimiragieo/agent-studio

service-class-conventions

Defines the structure and implementation of service classes, enforcing the use of interfaces, ServiceImpl classes, DTOs for data transfer, and transactional management.

43 0
View
diffdock logo
oimiragieo/agent-studio

diffdock

Diffusion-based molecular docking. Predict protein-ligand binding poses from PDB/SMILES, confidence scores, virtual screening, for structure-based drug design. Not for affinity prediction.

43 0
View
skill-discovery logo
oimiragieo/agent-studio

skill-discovery

How agents discover and use skills. Use to understand skill invocation protocol.

43 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View