Skip to content
Shelf

Review my code for bugs, security holes, and missed edge cases

History

1 version. Every save that changes the prompt is kept.

Version 1

This is the first version, so there is nothing to compare it with.

Review the code below as a careful senior engineer would. I care about whether it is correct and safe, not how it is formatted.

Language or framework: {{language}}
What the code is supposed to do: {{purpose}}

Look for:
1. Bugs: logic errors, off-by-one mistakes, wrong conditions, unhandled null or empty values, wrong types.
2. Edge cases: empty input, very large input, duplicates, unusual characters, time zones, two things happening at once.
3. Security: unvalidated input, injection, secrets in code, missing permission checks, unsafe handling of files or URLs.
4. Error handling: failures that are swallowed, error messages that leak internals, resources that are never released.
5. Performance, only where it would actually hurt: work repeated inside loops, queries inside loops, loading everything into memory.

For each finding give:
- Severity: critical, high, medium, or low.
- Where: the function or line.
- What goes wrong: a specific input or situation, and the wrong result.
- The fix, as a short code snippet.

Rules:
- Order findings from most to least severe.
- Skip formatting, naming, and anything a linter would catch.
- If you are not sure something is a bug, say so and say what you would check.
- If the code looks correct, say that. Do not invent problems to fill the list.

End with one line: is this safe to ship as it is, yes or no, and why.

Code:
{{code}}