---
description: Audit the selected file or current changes for security vulnerabilities
agent: ask
argument-hint: file or area to audit
---

Perform a security review of ${input:target:file, folder, or "current changes"}. Don't edit files.

Look for:
- Broken access control: missing authentication, missing object-level ownership checks (IDOR), privilege checks only in the UI.
- Injection: SQL/NoSQL built with strings, shell commands with user input, unsafe HTML rendering (XSS), template injection, path traversal.
- SSRF and open redirects from user-supplied URLs.
- Secrets in code, config, tests, or logs; weak crypto or password hashing; JWTs without signature/expiry checks.
- Missing CSRF protection on cookie-authenticated mutations; insecure cookie flags.
- Unsafe deserialization and file uploads (type/size checks, storage location).
- Missing rate limiting on auth and expensive endpoints.
- For LLM features: user or retrieved content that can steer tools with side effects (prompt injection).

## Output
A table: Severity (Critical/High/Medium/Low) | Location | Issue | Attack scenario | Fix. Order by severity. If nothing is found in a category, don't list it. End with the top 3 fixes to do first.
