Security Code Review by LLMs: A Deep Dive into Responses

要約

セキュリティ コード レビューは、自動化されたツールと手動の作業を組み合わせて、開発中にセキュリティ上の欠陥を検出することを目的としています。
大規模言語モデル (LLM) の急速な開発により、ソフトウェア開発における有望な可能性が示されるとともに、自動セキュリティ コード レビューにおける新たな可能性が開かれています。
セキュリティ欠陥検出のための実際のコードレビューに LLM を適用する際の課題を調査するために、この研究では、549 の 5 つのプロンプトの下で 3 つの最先端の LLM (Gemini Pro、GPT-4、および GPT-3.5) の検出パフォーマンスを比較しました。
実際のコードレビューで得られたセキュリティ上の欠陥を含むコードファイル。
無作為に選択した 100 個のコード ファイルに基づいて、最もパフォーマンスの高い LLM とプロンプトの組み合わせによって生成された 82 個の応答を分析することにより、これらの応答に存在する品質上の問題を抽出し、5 つのテーマと 16 のカテゴリに分類しました。
私たちの結果は、LLM によって生成される応答には冗長さ、曖昧さ、不完全さがあることが多く、簡潔さ、わかりやすさ、セキュリティ欠陥検出への準拠性を強化する必要性を強調しています。
この研究により、セキュリティ コード レビューにおける LLM 生成の応答の欠陥が明らかになり、このタスクに向けた将来の LLM の最適化への道が開かれます。

要約(オリジナル)

Security code review aims to combine automated tools and manual efforts to detect security defects during development. The rapid development of Large Language Models (LLMs) has shown promising potential in software development, as well as opening up new possibilities in automated security code review. To explore the challenges of applying LLMs in practical code review for security defect detection, this study compared the detection performance of three state-of-the-art LLMs (Gemini Pro, GPT-4, and GPT-3.5) under five prompts on 549 code files that contain security defects from real-world code reviews. Through analyzing 82 responses generated by the best-performing LLM-prompt combination based on 100 randomly selected code files, we extracted and categorized quality problems present in these responses into 5 themes and 16 categories. Our results indicate that the responses produced by LLMs often suffer from verbosity, vagueness, and incompleteness, highlighting the necessity to enhance their conciseness, understandability, and compliance to security defect detection. This work reveals the deficiencies of LLM-generated responses in security code review and paves the way for future optimization of LLMs towards this task.

arxiv情報

著者 Jiaxin Yu,Peng Liang,Yujia Fu,Amjed Tahir,Mojtaba Shahin,Chong Wang,Yangxiao Cai
発行日 2024-01-29 17:13:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク