I use coding assistants because they help me get to a working draft faster. A working draft still needs review, especially when it touches authentication, user input, permissions, or secrets.
On a side project, I asked an assistant to sketch a JWT login flow. The code compiled and the happy-path test passed. Reading it more carefully raised questions the test had not answered: where should the signing key come from, which algorithms and claims should the verifier accept, and how should repeated login failures be handled? The useful lesson was not that the generated code was uniquely bad. It was that “it runs” had not checked those requirements.
What I review first
Authentication and authorization. Verify tokens with a maintained library and an explicit algorithm allowlist. Validate the issuer, audience, expiry, and other claims required by the application. A valid signature alone does not decide whether a user may perform an action. OWASP’s JWT guidance covers common verification mistakes. For login endpoints, also decide how to limit and monitor repeated failures; see the OWASP Authentication Cheat Sheet.
Input and output handling. Trace untrusted input to database queries, shell commands, HTML rendering, redirects, and file paths. Prefer parameterized queries and context-appropriate output encoding. If code uses raw SQL or an HTML escape hatch, check exactly how untrusted values are handled instead of assuming the helper makes them safe.
Secrets and configuration. Check that credentials are loaded from the intended server-side configuration and are not committed, logged, or included in client code. Placeholder strings and realistic-looking example keys should not silently become production defaults.
Errors and permissions. Look for stack traces or sensitive details returned to users, missing authorization checks, overly broad CORS rules, and service accounts with more access than the feature needs. These decisions depend on the app’s threat model, so the prompt needs to state the constraints and the reviewer needs to verify the result.
Tests and scanners help; they do not certify the code
Tests can check expected behavior and important failure cases. Static analysis can point to risky patterns. Neither proves a feature secure: a test only covers the cases it asserts, and a scanner can miss design errors or report findings that need context.
My routine is to read security-sensitive diffs, add tests for rejected as well as accepted inputs, and use scanners as another source of findings. I ask the coding assistant to explain its trust boundaries and assumptions, then check those against the actual application. That makes review more focused without treating generated explanations as evidence.
Coding assistants are useful implementation tools. The person shipping the feature still has to decide what the code is allowed to do and verify that it does only that.