/security

AI-powered security vulnerability scan for a single file or every code file under a directory. Findings use a stacked severity format (Critical → Low) with impact, rationale, and concrete fixes.

Syntax

/security <file>

Scan one source file for security issues.

/security app/auth.py

/security <directory>

Walk code files in a directory and scan each.

/security ./core

Features

  • Language-aware prompts from the file extension
  • Large files truncated (~8k chars) so the model can still analyze
  • Severity buckets: Critical, High, Medium, Low
  • Each finding includes Location, Impact, Why it matters, Fix, optional Example
  • Ends with Summary + Priority fixes
  • Requires AI - run /setup first

Examples

/security app/auth.py
/security ./core
/security services/payments.py

Output shape

Findings are stacked (not dense tables), for example:

### FINDING-1 - High
Location: login() ~L42-L58
Impact: …
Why it matters: …
Fix: …
## Summary
## Priority fixes

Suggested workflow

  1. Run /security on the risky module.
  2. Triage Critical/High findings yourself.
  3. Hand accepted remediations to the coding agent as a plain-text task with paths and constraints.
  4. Re-scan after the agent finishes.

Treat findings as guidance. Verify before shipping - models can miss context or over-flag.