Security Audit
Conduct a thorough security audit of your code and identify vulnerabilities.
Prompt template
Conduct a comprehensive security audit for the following [PROGRAMMING LANGUAGE] code. **Check for these vulnerability categories:** 1. **Injection Attacks:** SQL Injection, Command Injection, LDAP Injection, XPath Injection 2. **Cross-Site Scripting (XSS):** Reflected, Stored, and DOM-based XSS 3. **Authentication & Authorization:** Weak password handling, missing permission checks 4. **Data Leaks:** Sensitive data in logs, unencrypted transmission, missing masking 5. **Cryptography:** Outdated algorithms, weak keys, insecure random numbers 6. **Input Validation:** Missing or insufficient input checks 7. **Session Management:** Session fixation, insecure cookies 8. **Dependencies:** Known vulnerabilities in used libraries **Output Format:** For each vulnerability found: Severity (Critical/High/Medium/Low), affected line, description, concrete fix with code example. Code: ```[PROGRAMMING LANGUAGE] [INSERT CODE HERE] ```
Replace placeholders in [square brackets]: [PROGRAMMING LANGUAGE][INSERT CODE HERE]
How to use this template
Copy the prompt, replace the placeholders in square brackets with your details and paste it into the AI assistant of your choice. The more precise your details, the better the result.
Tips for better results
- Specify whether it's a web application, API, or backend service
- Mention security frameworks and libraries in use
- Ask for OWASP Top 10 coverage
- Request a security report in Markdown format
Suitable open models
The selection names current open models as a starting point for your own tests. It is not a measurement for this template.
Keywords: #security #audit #vulnerabilities #owasp