Paste a function or module and get a focused security audit: vulnerabilities ranked by severity, each with a patched version. Works for any language.
## Security Audit
### CRITICAL
**SQL Injection — Line 23**
`query = 'SELECT * FROM users WHERE email = ' + email`
Direct string concatenation allows injection. Patched:
```python
cursor.execute('SELECT * FROM users WHERE email = %s', (email,))
```
### HIGH
**Missing input validation — Line 41**
No length check on amount field before payment processing. Add: `if not 0 < amount <= 10000: raise ValueError`
### LOW
**Hardcoded timeout — Line 89**
Move to environment config for flexibility without redeployment.Constraints