A coding assistant can propose changes quickly, but the application team is responsible for the result. Give AI-generated code the same security review as another contribution, with extra attention to unplanned changes and assumptions.
Checklist
- Review the actual diff
Read the actual diff against the requested work and identify unrelated edits, new dependencies, or changed workflow permissions. Ask the change owner to explain any difference that expanded the intended scope.
- Check security boundaries
Trace changes that touch authorization, data validation, or sensitive configuration to the requirement that should govern them. Have the maintainer confirm the assistant's explanation against the repository and the intended feature behavior.
- Verify changed behavior
Review the test results and run approved checks for representative allowed and denied cases when relevant. Keep the tests tied to the patch revision the maintainer actually evaluated before deciding whether to merge.
- Record human approval
Give the ordinary code owners the full review context, including unresolved concerns and who will investigate them. Preserve the final human decision and relevant evidence with the pull request.
Worked example
Suppose an AI-authored change adds a support export. The feature owner writes down who may request the export, which fields belong in it, and how access expires. The reviewer traces those rules in the candidate diff and asks for synthetic fixtures that demonstrate expected behavior. Keep the human approval and code revision with the result.
Verify the result
Select a generated candidate and confirm the reviewer can identify one touched security boundary, locate the corresponding test evidence, and name the owner who accepted the change.