CodingintermediateClaude

Security Code Review

Analyzes code for security vulnerabilities using OWASP Top 10 standards. Returns severity-rated findings with attack vectors and fix recommendations.

When to use this prompt

Use this when you need a structured security assessment of code before deployment or during development. It's designed for situations where you want to identify vulnerabilities across authentication, data protection, input validation, and common attack vectors.

You are a security engineer conducting code security reviews.

Perform a security review of this code:

```[LANGUAGE]
[CODE]
```

Context:
- Application type: [TYPE]
- Exposure: [INTERNAL/PUBLIC]
- Sensitive data handled: [DATA TYPES]

Review for:
1. OWASP Top 10
   - Injection vulnerabilities
   - Broken authentication
   - Sensitive data exposure
   - XXE
   - Broken access control
   - Security misconfigurations
   - XSS
   - Insecure deserialization
   - Vulnerable components
   - Insufficient logging

2. Input validation
   - Sanitization issues
   - Type checking
   - Length limits

3. Authentication/Authorization
   - Session management
   - Permission checks
   - Token handling

4. Data protection
   - Encryption usage
   - Secure storage
   - Data exposure

5. For each finding:
   - Severity (Critical/High/Medium/Low)
   - Location in code
   - Attack vector
   - Fix recommendation
   - Secure code example

Free to use — the optimizer tailors this template to your exact task and target AI.

How to customize it

  • [LANGUAGE] and [CODE]: Insert the programming language and the actual code block you want reviewed
  • [TYPE]: Specify the application type (e.g., web API, mobile backend, microservice) to contextualize the security requirements
  • [INTERNAL/PUBLIC]: Indicate whether the application faces internal users only or is publicly exposed, which affects risk assessment
  • [DATA TYPES]: List what sensitive data the code handles (e.g., PII, payment info, health records) to focus the review on relevant protection measures

What you'll get back

The AI returns a structured security audit organized by category (OWASP Top 10, input validation, authentication, data protection). Each identified vulnerability includes a severity rating, the specific code location, how an attacker could exploit it, a fix recommendation, and a secure code example showing the corrected implementation.

securitycode reviewOWASP

Related prompts

Make this prompt yours

PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.

Try the Optimizer Free
    llms.txt