Adversarial Code Review: Can AI Reviewers Be Fooled by Semantic Perturbations?

AI-powered code review tools are increasingly deployed in production environments to automate software quality assurance. However, the security implications of these systems remain underexplored. This paper investigates whether AI code reviewers can be fooled by adversarially perturbed code, building on prior work that identified a three-tier detectability hierarchy for code perturbations. We evaluate a CodeBERT-based AI reviewer on 550 Python samples containing five perturbation strategies, measuring false approval rates across perturbation types. Our results reveal a critical vulnerability: semantic boundary inversions achieve a 90% false approval rate, meaning AI reviewers approve 9 out of 10 adversarially modified code samples. Even an ensemble system combining AI embeddings with AST features fails to detect 80% of boundary inversions. These findings highlight significant security gaps in AI-based code review systems and underscore the need for specialized detectors targeting semantic perturbations.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-05
DOI
https://doi.org/10.5281/zenodo.22357507
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Adversarial Code Review: Can AI Reviewers Be Fooled by Semantic Perturbations?

Aman Mukati
Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
preprint

Adversarial Code Review: Can AI Reviewers Be Fooled by Semantic Perturbations?

Aman Mukati
preprint en

Abstract

AI-powered code review tools are increasingly deployed in production environments to automate software quality assurance. However, the security implications of these systems remain underexplored. This paper investigates whether AI code reviewers can be fooled by adversarially perturbed code, building on prior work that identified a three-tier detectability hierarchy for code perturbations. We evaluate a CodeBERT-based AI reviewer on 550 Python samples containing five perturbation strategies, measuring false approval rates across perturbation types. Our results reveal a critical vulnerability: semantic boundary inversions achieve a 90% false approval rate, meaning AI reviewers approve 9 out of 10 adversarially modified code samples. Even an ensemble system combining AI embeddings with AST features fails to detect 80% of boundary inversions. These findings highlight significant security gaps in AI-based code review systems and underscore the need for specialized detectors targeting semantic perturbations.

Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.