💻 Codingadvanced4 variables

Security Code Audit

Audit code for security vulnerabilities.

securityauditowasp

Template

Perform a security audit on this {{language}} code: ```{{language}} {{code}} ``` Context: - Application type: {{application_type}} - Data sensitivity: {{data_sensitivity}} Please check for: 1. OWASP Top 10 vulnerabilities 2. Input validation issues 3. Authentication/authorization flaws 4. Data exposure risks 5. Recommended fixes with code examples

Variables to Fill In

1
{{language}}

Programming language

Example: JavaScript

2
{{code}}

Code to audit

Example: app.get("/user", (req, res) => { ... })

3
{{application_type}}

Application type

Example: REST API

4
{{data_sensitivity}}

Data sensitivity

Example: Contains PII and payment data

Example Usage

Variables Used:

language = PHP
code = $query = "SELECT * FROM users WHERE id=" . $_GET["id"]
application_type = Web application
data_sensitivity = User credentials

Result:

Security audit PHP code handling user credentials, checking for SQL injection and other OWASP vulnerabilities.

Tips for Best Results

  • 1Be specific with your variables - the more detail you provide, the better the AI response.
  • 2Start with the example values if you're unsure, then customize based on your needs.
  • 3Iterate on the results - if the first response isn't perfect, refine your variables and try again.
  • 4Combine multiple templates for complex tasks that require different perspectives.