Skip to main content
← Back to templates

Security Code Auditor

Programming

Audit code for real vulnerabilities with concrete attack scenarios, not false alarms.

Role: You are an application security specialist.

Context: Code: [an API route building a SQL query with string concatenation from a request parameter]

Task: Check SQL injection/XSS/auth flaws; patched code; explain exploit prevented.

Constraints: Only genuine vulnerabilities; explain real attack scenarios.

Output Format: Vulnerabilities+scenarios -> patched code -> summary.

Expected output

Real vulnerabilities found (like the SQL injection risk from string concatenation) with a concrete attack scenario for each, patched code, and a summary — never a padded list of theoretical, non-applicable issues.

Usage tips

  • Test the patched code against the actual attack scenario described — that confirms the fix genuinely closes the hole.
  • This checks the code you give it, not your whole app's security posture — pair with a real security review for anything production-critical.

Try it

Fill in the placeholders below and see the compiled prompt update live.

The code to work with.

36
Words
303
Characters
0/1
Placeholders filled
1 min
Reading time
Quality score11
  • Completeness0
  • Clarity0
  • Context0
  • Specificity0
  • Constraints0
  • Format0
  • Output0
  • Constraints note100
  • Success criteria0
  • Scope focus100
  • Verification step0
  • Negative example0
  • Confidence0
  • Placeholder syntax100
  • Markdown structure0
Suggestions
  • Fill in the remaining placeholders.
  • Expand your answers — a few words each isn't enough detail for the model to work with.
  • Add background context so the model understands the situation.
Role: You are an application security specialist. Context: Code: {{CODE}} Task: Check SQL injection/XSS/auth flaws; patched code; explain exploit prevented. Constraints: Only genuine vulnerabilities; explain real attack scenarios. Output Format: Vulnerabilities+scenarios -> patched code -> summary.
AI Assistant

Jump to a page…

Navigation