When AI Agrees Too Much: Manipulating Automated Code Review via Bias Injection
Organizations: University of Athens · National Infrastructures for Research and Technology · Athens University of Economics and Business · National Cybersecurity Authority of Greece
Abstract
Automated Code Review (ACR) systems integrating Large Language Models (LLMs) are increasingly adopted in software development workflows, ranging from interactive assistants to autonomous agents in CI/CD pipelines. In this paper, we study how LLM-based vulnerability detection in ACR is affected by the framing effect: the tendency to let the presentation of information override its semantic content in forming judgments. We examine whether adversaries can exploit this through contextual-bias injection (crafting PR metadata to bias ACR security judgments) as a supply-chain attack vector against real-world ACR pipelines. To this end, we first conduct a large-scale exploratory study across 6 LLMs under five framing conditions, establishing the framing effect as a systematic and widespread phenomenon in LLM-based vulnerability detection. We then design a realistic and controlled experimental environment, evaluating 33 CVEs across 20 real-world projects and two popular ACR pipelines (Claude Code and CodeRabbit), to assess the susceptibility of real-world ACR pipelines to vulnerability re-introduction attacks. We employ two attack strategies: a template-based attack inspired by prior related work, and a novel LLM-assisted refinement attack. We find that template-based attacks are ineffective and may even backfire, as direct biasing attempts raise suspicions. Our refinement attack, on the other hand, is successful in 32/33 (97%) cases, exploiting a fundamental asymmetry: attackers can iteratively refine attacks against a local clone of the review pipeline, while defenders have only one chance to detect them. Overall, our findings highlight the dangers of over-relying on ACR and stress the importance of human oversight and contributor trust in the development process.
Figures & tables
| CWE | Language | Vuln. | Patched | CWE-25 |
| 79 (XSS) | PHP | 49 | 50 | #1 |
| 79 (XSS) | JavaScript | 50 | 50 | #1 |
| 89 (SQL Injection) | PHP | 49 | 50 | #2 |
| 125 (Buffer Read) | C | 50 | 50 | #8 |
| 787 (Buffer Write) | C | 49 | 50 | #5 |
| Total | 247 | 250 |
| Project | Lang. | CVE | CWE | B-1 | B-2 | D-1 | D-2 |
| Claude Code (17 CVEs) | |||||||
| strapi | TS, JS | 2024-56143 | 639 | ✓ | – | × | – |
| 2024-34065 | 294 | × | ✓ | × | – | ||
| xbmc | C++ | 2023-30207 | 369 | × | ✓ | × | – |
| 2023-23082 | 787 | × | ✓ | × | – | ||
| cherry-studio | TS | 2025-54063 | 94 | ✓ | – | × | – |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Redacted channel | PRs accepted | ||||
| Variant | Description | Commit msg. | Comments | Claude Code | CodeRabbit |
| Baseline | – | – | – | 1/17 | 3/16 |
| B-2 | – | – | – | 17/17 | 15/16 |
| D-1 | – | – | 5/17 | 11/16 | |
| D-2A | – | 1/17 † | 4/16 | ||
| D-2B | – | 1/17 † | 4/16 | ||
Automated Code Review
Automated code review uses software analysis and AI to find defects, assess changes, and support pull-request decisions.
See all 50 papers