Developer plants 15 bad pull requests to stress-test an AI code reviewer and reports five failures
A developer built CodeGuard AI, a self-hosted pull-request reviewer for Java and Spring Boot, after an AI reviewer recommended merging code that tests showed was broken. To evaluate it, they wrote 15 pull requests containing vulnerabilities such as SQL and command injection, plus safe code that should not be flagged, and ran them through the tool with a real AI provider and Docker. The testing surfaced five issues, including a case where the AI summary said "Safe to Merge" while the policy engine returned "Do Not Merge," which the developer addressed by reconciling the two outputs. Another bug was a regex flaw that caused a tautological test to go unflagged, fixed by a one-character change to a possessive quantifier. The author also described adding an opt-in dependency cache volume that cut review times to roughly one to two minutes, while noting the security trade-off of sharing caches across runs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in