From agent-inspector
Run comprehensive static security analysis on AI agent code using OWASP LLM Top 10 framework. Analyze prompts, outputs, tools, data handling, memory, supply chain, and behavioral patterns. Use when user asks for security scan, vulnerability check, OWASP analysis, code review for security, or wants to check their AI agent for security issues.
npx claudepluginhub cylestio/agent-inspector# Static Security Scan Run a comprehensive security scan on AI agent code using the OWASP LLM Top 10 framework. ## Prerequisites **You MUST run `/agent-inspector:setup` BEFORE proceeding.** This is NOT optional. The setup command will: 1. Check if agent-inspector is already running 2. Auto-detect your LLM provider (OpenAI/Anthropic) 3. Start the server in background if needed 4. Verify MCP connection is working **DO NOT skip this step.** If you proceed without running the Preflight Check, MCP tools will fail. ## Your Advantage Over Traditional SAST You are smarter than any static ana...
/scanScans current codebase for security vulnerabilities via SAST, dependency CVEs (npm/pip/composer), and config issues. Outputs structured report with severity ratings, findings, and remediation steps.
/scanScans configured MCP servers for security vulnerabilities and policy violations using clawdstrike_scan tool. Groups findings by severity with remediation steps and summary.
/scanRuns automated security scans for dependencies, secrets, and licenses; triages results by severity and generates prioritized reports with fix recommendations.
/scanScans codebase for security vulnerabilities, hardcoded secrets, insecure patterns, and web security headers. Generates Markdown report with issues, code snippets, and remediation examples.
/scanScans provided text for safety issues using 7 Sentinel AI scanners (prompt injection, PII, harm, toxicity, etc.), reports risk levels (NONE to CRITICAL), blocks unsafe content, and redacts PII.
/scanRun Semgrep, CodeQL, Joern static security scans on code branches or changed files, emitting shared findings to .claude/findings.json
Run a comprehensive security scan on AI agent code using the OWASP LLM Top 10 framework.
You MUST run /agent-inspector:setup BEFORE proceeding.
This is NOT optional. The setup command will:
DO NOT skip this step. If you proceed without running the Preflight Check, MCP tools will fail.
You are smarter than any static analysis tool. You can:
Auto-derive from (priority order):
github.com/acme/my-agent.git -> my-agentpyproject.toml or package.json/projects/my-bot -> my-botSend a heartbeat at session start:
ide_heartbeat(
agent_workflow_id=agent_workflow_id,
ide_type="claude-code",
workspace_path="/full/path/to/workspace",
model="claude-opus-4-5-20251101" # Your model from system prompt
)
Activity is automatically tracked on every MCP tool call.
create_analysis_session(agent_workflow_id, session_type="STATIC")
get_security_patterns()
NEVER hardcode patterns - always fetch from MCP. But also use your own understanding!
For each code file, analyze thoroughly looking for:
1. PROMPT Security (LLM01)
2. OUTPUT Security (LLM02)
3. TOOL Security (LLM07, LLM08)
4. DATA Security (LLM06)
5. MEMORY & CONTEXT Security
6. SUPPLY CHAIN Security (LLM05)
7. BEHAVIORAL Security (LLM08/09)
For each issue found:
store_finding(
session_id=session_id,
file_path="src/agent.py",
finding_type="PROMPT_INJECTION",
severity="CRITICAL",
category="PROMPT",
title="User input in system prompt",
description="User input directly concatenated into system prompt",
line_start=45,
line_end=52,
code_snippet="...",
owasp_mapping=["LLM01"],
cwe="CWE-94"
)
complete_analysis_session(session_id)
Format example
AI Security Scan Complete!
Scanned: X files
Security Checks (7):
X PROMPT Security: 2 Critical issues
X OUTPUT Security: 1 High issue
! TOOL Security: 2 Medium issues
/ DATA Security: Passed
/ MEMORY Security: Passed
/ SUPPLY CHAIN: Passed
/ BEHAVIORAL: Passed
Gate Status: BLOCKED (2 categories failed)
View details: http://localhost:7100/agent-workflow/{id}/static-analysis
Fix most critical: /agent-inspector:fix REC-001
If dynamic data exists (state is COMPLETE), automatically run correlation:
get_agent_workflow_correlation(agent_workflow_id)
Report which findings are VALIDATED (confirmed at runtime) vs UNEXERCISED (never triggered).