How to Review Changes and Run a Security Review
Learn how to effectively review code changes and conduct a security review before pushing branches or opening merge requests. This guide helps identify mistakes and security risks, ensuring a safer and cleaner codebase.
Estimated time: 3 minutes
Difficulty: Beginner
Why you'd use this
Before you push a branch or open a merge request, a second pair of eyes on the diff catches mistakes and risky patterns. Review Changes reads your uncommitted git diff and comments on it like a reviewer would. Security Review reads the same diff, or the whole project when there is no diff, and looks specifically for injection, secrets, unsafe deserialisation and similar classes of problem.
Before you start
Permissions required:
- None.
You'll need:
- A git repository with uncommitted or staged changes (for Review Changes).
- Git installed and available on PATH.
Steps
- Make some changes in the working tree and save them.
- Press / in the composer and choose Review changes (git), or run eLLM: Review Changes from the Command Palette.
- Read the review. Findings reference the changed files and lines; click a reference to jump to it.
- Ask a follow-up such as "Fix the first two findings." Proposed fixes arrive as diff cards.
- For a security pass, choose Security review from the same menu. With changes present it reviews the diff; with a clean tree it reviews the project.
What you should see
A structured review that separates blocking problems from suggestions. Very large diffs are truncated at the context byte limit and the review says so, so review in smaller batches if you hit that.
Troubleshooting
- "No changes" or an empty review: the working tree is clean. Commit less often during the review, or review a range by describing the branch in the chat.
- Git is not found: install git or open the folder from a shell where git is on PATH, then reload the window.
Related guides
- How to Use Quick Commands from the Editor
- How to Make Code Changes with Reviewable Diffs
person people found this useful.