Skip to main content
QUICK REVIEW

[論文レビュー] Measuring and Exploiting Confirmation Bias in LLM-Assisted Security Code Review

Dimitris Mitropoulos, Nikolaos Alexopoulos|arXiv (Cornell University)|Mar 19, 2026
Software Engineering ResearchComputer Science被引用数 0
ひとこと要約

この論文は、LLMベースのセキュリティコードレビューにおける確認バイアスが脆弱性検出を低下させ、攻撃者がbiased PRメタデータを通じてこれを悪用できることを示し、デバイアリングが影響を緩和することを示しています。

ABSTRACT

Security code reviews increasingly rely on systems integrating Large Language Models (LLMs), ranging from interactive assistants to autonomous agents in CI/CD pipelines. We study whether confirmation bias (i.e., the tendency to favor interpretations that align with prior expectations) affects LLM-based vulnerability detection, and whether this failure mode can be exploited in software supply-chain attacks. We conduct two complementary studies. Study 1 quantifies confirmation bias through controlled experiments on 250 CVE vulnerability/patch pairs evaluated across four state-of-the-art models under five framing conditions for the review prompt. Framing a change as bug-free reduces vulnerability detection rates by 16-93%, with strongly asymmetric effects: false negatives increase sharply while false positive rates change little. Bias effects vary by vulnerability type, with injection flaws being more susceptible to them than memory corruption bugs. Study 2 evaluates exploitability in practice mimicking adversarial pull requests that reintroduce known vulnerabilities while framed as security improvements or urgent functionality fixes via their pull request metadata. Adversarial framing succeeds in 35% of cases against GitHub Copilot (interactive assistant) under one-shot attacks and in 88% of cases against Claude Code (autonomous agent) in real project configurations where adversaries can iteratively refine their framing to increase attack success. Debiasing via metadata redaction and explicit instructions restores detection in all interactive cases and 94% of autonomous cases. Our results show that confirmation bias poses a weakness in LLM-based code review, with implications on how AI-assisted development tools are deployed.

研究の動機と目的

  • 確認バイアスがセキュリティコードレビューにおけるLLMベースの脆弱性検出に影響するかを評価する。
  • 複数モデルと脆弱性タイプ間でフレーミングが検出パフォーマンスに与える影響を定量化する。
  • 相互作用的および自律的なレビュー環境におけるバイアスの対立実装(アドバサリアルPR)を通じた実務的な悪用可能性を評価する。
  • AI支援レビューツールにおけるバイアスを緩和するデバイアリング手法と展開指針を調査する。

提案手法

  • 4つのLLMで五つのフレーミング条件下、250件のCVE修正ペアを含む制御されたバイアス実験を実施し、総計約10,000クエリを実施する。
  • 自動指標以上の検出品質を評価するために、手動でCVE修正と検出結果を検証する。
  • 真陽性率と偽陽性率の変化を含むバイアス指標を計算し、効果量としてCohen’s hを用いた二標本z検定を適用する。
  • インタラクティブおよび自律的なレビュー文脈で、修正を元に戻すような敵対的PRを作成し、バイアス誘発メタデータを埋め込むことで供給網攻撃をシミュレーションする。
  • データメタデータの赤락化と明示的指示によるデバイアリングを評価し、検出の回復を測定する。

実験結果

リサーチクエスチョン

  • RQ1RQ1: LLMは脆弱性検出における確認バイアスに影響を受けやすいか、フレーミング条件は検出率と誤分類のタイプにどう影響するか。
  • RQ2RQ2: バイアスの感受性と攻撃成功に影響を与える脆弱性特性およびコード特性は何か。
  • RQ3RQ3: 確認バイアスはLLMベースのコードレビュ―におけるサプライチェーン攻撃を可能にするか、デバイアリング戦略はどれほど有効か。

主な発見

  • フレーミングをバグなしとして設定すると、4モデル全体で脆弱性検出率が大幅に低下する(例:GPT-4o-miniで97.2%→3.6%)、偽陰性が大幅に増加。
  • 中立フレーミング下で patched コードの偽陽性が高く(68.4–96.8%)、バイアスにより一部モデルでFPRがさらに上昇(最大13.6pp)。
  • バイアス効果は強く非対称で、偽陰性バイアスが偽陽性バイアスを大きく上回る(4–114×)、精度パラドックスを生み出す。
  • 敵対的PRフレーミングは統制実験で大きな攻撃成功率を示す(GitHub Copilotに対して35%、Claude Codeに対して88%)、自律設定での反復的洗練により成功率が向上。
  • メタデータの赤락化と明示的指示によるデバイアリングは検出を回復させ、自律ケースで最大93.75%、インタラクティブケースを完全回復する。
  • 本研究はデプロイメント指針と公的アーティファクトを提供し、堅牢なAI支援セキュリティレビュ研究を推進する。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。