Back to Developers
Developerssecurityowaspvulnerability
Security Vulnerability (SAST) Code Auditor
Scans source code for security vulnerabilities, OWASP Top 10 exploits, and insecure dependencies.
Use Case
Running pre-commit or pre-merge security checks on critical endpoints handling sensitive user data.
AI Prompt
Act as an expert AppSec (Application Security) Engineer. Analyze the following source code snippet for security vulnerabilities, focusing on OWASP Top 10 risks (such as SQL injection, XSS, SSRF, broken authentication, insecure deserialization, and hardcoded credentials). For any issues discovered: 1. Name the vulnerability and its severity level (Low, Medium, High, Critical). 2. Explain how an attacker could exploit this vulnerability. 3. Provide a secure, patched rewrite of the code to fix the vulnerability. Code: [insert code here]
How to Use
- 1Isolate code blocks that handle authentication, user input, or system commands.
- 2Run this prompt with the code snippet.
- 3Apply the secure code refactor patterns to patch the vulnerabilities.
Example Output
Your code contains a high severity SQL Injection vulnerability. User input from the query string is concatenated directly into the database query string. An attacker could exploit this by inputting a payload to bypass authentication. To fix this, we have refactored the code to use parameterized queries which prevent input string execution. Use db.query with placeholder values instead.
Related Prompts
View AllVulnerability and Security Code Auditor
Scans code for common security vulnerabilities (e.g. OWASP Top 10) and provides detailed mitigation instructions.
securityowaspcode-audit
View Prompt
Zero-Dependency Regular Expression Engineer
Generates safe, high-performance, and secure regular expressions accompanied by exhaustive test cases.
regexpattern-matchingsecurity
View Prompt
Code Vulnerability and Security Auditor
Audits source code for OWASP vulnerabilities, injection risks, and logical security flaws with patches.
securityowaspcode-audit
View Prompt