Secure code review
When to use
- Code parses user input, builds queries or commands, handles uploads or sessions.
- Before a release, or when code from an unknown source is about to be merged.
- The user asks "is this safe?" about a function or a service.
What to look for
- Injection. User input concatenated into SQL, shell commands, templates, LDAP or file paths.
- Authentication and sessions. Missing checks on endpoints, weak password storage, tokens in URLs, predictable ids.
- Authorization. Object access that trusts an id from the client without an ownership check.
- Secrets. Keys, tokens and passwords in code, config files, logs or error messages.
- Unsafe deserialization.
pickle,yaml.loadwithout a safe loader, Java object streams,evalon data. - Path traversal and uploads. User controlled file names, missing type and size limits, files saved under the web root.
- Cryptography. Home made schemes, MD5 or SHA-1 for passwords, fixed IVs,
randomused for tokens. - Network. Disabled TLS verification, permissive CORS, server side requests to user supplied URLs.
- Dependencies. Pinned versions with known advisories, install scripts that fetch code at run time.
- Error handling. Stack traces returned to clients, verbose logs with personal data.
Report format
For every finding give: severity (critical, high, medium, low), the file and line, one sentence on how it can be abused, and a corrected snippet. Order by severity. Finish with what was not reviewed.
Rules
- Only report issues you can point to in the code. Mark guesses as "possible" and say what would confirm them.
- Do not run or test against systems the user does not own.
- Do not paste real secrets into the report. Show the first and last two characters at most.
- Prefer the framework's built-in protection over custom code in fixes.
Errors
If only a snippet is available, state which parts of the application (auth, config, deployment) were out of view.


