AI coding assistants can produce useful patches quickly, but generated code still needs the same engineering scrutiny as code written by a person. In some cases it needs more: plausible-looking code can hide unsafe defaults, invented APIs or missing error handling. Teams should review the behavior and the context, not the identity of the authoring tool.
Check the problem and the diff
Start with the issue or acceptance criteria. Confirm that the patch solves the requested problem and does not include unrelated refactoring. Large generated diffs are harder to review; ask for smaller changes with clear boundaries and a concise explanation of the design.
Verify APIs and dependencies
Check that functions, package names and configuration options actually exist in the versions used by the project. Review new dependencies for maintenance status, license, known vulnerabilities and unnecessary permissions. Do not accept a dependency simply because the generated code imports it.
Look for security regressions
Inspect input validation, authorization checks, SQL construction, shell commands, file paths, deserialization and secret handling. Pay attention to trust boundaries and error messages that may reveal sensitive data. Run static analysis and dependency scanning, but do not treat a clean scan as proof of correctness.
Test failure behavior
Review tests for edge cases, malformed input, network failures, timeouts and retries. Confirm that tests assert the intended behavior rather than mirroring the implementation. Add regression tests for the bug or feature being changed and run the relevant suite in CI.
Check maintainability
Look for duplicated logic, unclear abstractions, dead code and comments that merely repeat the implementation. Confirm that logs are useful without exposing private data. Ensure the patch follows project conventions and that migrations or configuration changes include rollback guidance.
Keep accountability human
Record the reviewer and the tests run. Developers should understand the code they merge and be able to explain its operational impact. Avoid pasting proprietary source code into tools that are not approved for that data.
Rule of thumb: treat AI-generated code as an untrusted contribution until it passes normal review, tests and security checks. Faster code generation only creates value when the resulting change is safe to operate.
Reference: OWASP Top 10 for LLM Applications — https://owasp.org/www-project-top-10-for-large-language-model-applications/





