Security-Focused Code Review
Referencing CWE numbers gets ChatGPT to think in terms of specific vulnerability classes rather than vague 'security issues'. The attack scenario requirement proves the vulnerability is real.
Review this {{language}} code specifically for security vulnerabilities: \`\`\` {{paste your code}} \`\`\` Check for: 1. Injection attacks (SQL, XSS, command injection, path traversal) 2. Authentication/authorization flaws 3. Sensitive data exposure (logging secrets, hardcoded credentials) 4. Insecure deserialization 5. Missing input validation at trust boundaries For each vulnerability found: - Name the vulnerability type (e.g., "CWE-89: SQL Injection") - Show the vulnerable line - Explain the attack scenario - Provide the fixed code If no vulnerabilities are found, confirm the code is clean and note what was checked.
Variables to customize
Why this prompt works
Referencing CWE numbers gets ChatGPT to think in terms of specific vulnerability classes rather than vague 'security issues'. The attack scenario requirement proves the vulnerability is real.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.