Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

An Insight into Security Code Review with LLMs: Capabilities, Obstacles and Influential Factors (2401.16310v3)

Published 29 Jan 2024 in cs.SE and cs.AI

Abstract: Security code review is a time-consuming and labor-intensive process typically requiring integration with automated security defect detection tools. However, existing security analysis tools struggle with poor generalization, high false positive rates, and coarse detection granularity. LLMs have been considered promising candidates for addressing those challenges. In this study, we conducted an empirical study to explore the potential of LLMs in detecting security defects during code review. Specifically, we evaluated the performance of six LLMs under five different prompts and compared them with state-of-theart static analysis tools. We also performed linguistic and regression analyses for the best-performing LLM to identify quality problems in its responses and factors influencing its performance. Our findings show that: (1) existing pre-trained LLMs have limited capability in security code review but? significantly outperform the state-of-the-art static analysis tools. (2) GPT-4 performs best among all LLMs when provided with a CWE list for reference. (3) GPT-4 frequently generates responses that are verbose or not compliant with the task requirements given in the prompts. (4) GPT-4 is more adept at identifying security defects in code files with fewer tokens, containing functional logic, or written by developers with less involvement in the project.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (7)
  1. Jiaxin Yu (16 papers)
  2. Peng Liang (94 papers)
  3. Yujia Fu (8 papers)
  4. Amjed Tahir (34 papers)
  5. Mojtaba Shahin (54 papers)
  6. Chong Wang (308 papers)
  7. Yangxiao Cai (3 papers)
Citations (5)

Summary

We haven't generated a summary for this paper yet.