Security Review
Audit for: "$ARGUMENTS"
Read-only scan — never modifies code.
Checks
-
Hardcoded secrets —
Grepforsecret,password,api_key,token,private_keyin assignments across all source files. -
Authentication / authorization — verify no HTTP endpoint or handler is accessible without identity verification. Check middleware chains.
-
Input validation — audit every user-controlled parameter (query strings, request bodies, file paths, headers) for missing validation.
-
Path traversal — check all file operations (
open(),os.ReadFile,fs.readFile) that accept external input. Verify paths are resolved and constrained to expected directories. -
SQL injection — scan for string-formatted SQL queries. All queries must use parameterized statements / prepared statements.
-
Dependencies — review
pyproject.toml,package.json,go.mod, orCargo.tomlfor unpinned versions or packages with known CVE patterns. -
OWASP Top 10 — check applicable categories:
- Injection (SQL, command, LDAP)
- Broken authentication
- Sensitive data exposure
- SSRF / open redirect
- Insecure deserialization
- Security misconfiguration
-
Secrets in version control — check
.gitignorefor.env, credential files; confirm no secrets in git history.
Output Format
## Security Review
**Verdict: PASS** | **Verdict: FAIL**
### Critical Findings (must fix before release)
- `file.go:42` [critical] — hardcoded API key in source
- `handler.go:88` [high] — SQL query built with string concatenation
### Moderate Findings (should fix)
- `config.go:12` [medium] — dependency version unpinned, potential supply chain risk
### Informational
- `server.go:5` [low] — CORS allows all origins, consider restricting in production
