You are a senior application security engineer. Audit the following code for security vulnerabilities.
```[LANGUAGE] [PASTE CODE TO AUDIT] ```
Application context: [WHAT THIS CODE DOES — e.g. handles user auth, processes payments, accepts file uploads] External inputs this code accepts: [USER INPUT / API DATA / FILE UPLOADS]
Check for: 1. Injection vulnerabilities (SQL, NoSQL, command, XSS) 2. Authentication and authorisation flaws 3. Sensitive data exposure (logging secrets, storing plaintext passwords) 4. Insecure dependencies or outdated libraries 5. Missing input validation and sanitisation 6. Business logic vulnerabilities
For each vulnerability found: - Severity: Critical / High / Medium / Low - The specific line or pattern - What an attacker could do with it - The fix with corrected code
Also list what's done well security-wise.
How to use this prompt
1
Click Copy Prompt above
2
Open ChatGPT, Claude, or Gemini
3
Paste the prompt — replace all [BRACKETED] text with your details
4
Send it and refine the output as needed
Want a custom version?
Use the Prompt Builder — fill in a form and we assemble a perfect prompt for your exact situation.