arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.03994cs.SE
收藏

利与弊!评估ChatGPT在软件漏洞方面的表现

Pros and Cons! Evaluating ChatGPT on Software Vulnerability

Xin Yin

AI总结:

本文基于Big-Vul数据集从五个软件漏洞任务系统评估ChatGPT,发现其在漏洞检测、严重性预测、定位、修复和CVE描述生成方面整体弱于现有最先进方法,并提出改进方向。

摘要:

本文提出了一种利用公开数据集对ChatGPT等交互式大语言模型进行定量评估的流程。我们使用Big-Vul数据集对ChatGPT进行了广泛的技术评估,涵盖五种不同的常见软件漏洞任务。基于该数据集,我们评估了ChatGPT在多任务和多语言方面的表现。我们发现,现有的最先进方法在软件漏洞检测方面总体上优于ChatGPT。尽管在提供上下文信息时ChatGPT的准确率有所提高,但在准确预测某些CWE类型的严重性评级方面仍存在局限性。此外,ChatGPT在定位某些CWE类型的漏洞方面表现出一定能力,但其性能在不同CWE类型之间存在差异。无论在提供还是不提供上下文信息的情况下,ChatGPT都表现出有限的漏洞修复能力。最后,ChatGPT在为各种CWE类型生成CVE描述时表现不均衡,在详细信息方面的准确性有限。总体而言,尽管ChatGPT在某些方面表现良好,但在理解代码漏洞的细微差异以及描述漏洞的能力方面仍需改进,以充分发挥其潜力。我们的评估框架为进一步增强ChatGPT的软件漏洞处理能力提供了有价值的见解。

英文摘要:

This paper proposes a pipeline for quantitatively evaluating interactive LLMs such as ChatGPT using publicly available dataset. We carry out an extensive technical evaluation of ChatGPT using Big-Vul covering five different common software vulnerability tasks. We evaluate the multitask and multilingual aspects of ChatGPT based on this dataset. We found that the existing state-of-the-art methods are generally superior to ChatGPT in software vulnerability detection. Although ChatGPT improves accuracy when providing context information, it still has limitations in accurately predicting severity ratings for certain CWE types. In addition, ChatGPT demonstrates some ability in locating vulnerabilities for certain CWE types, but its performance varies among different CWE types. ChatGPT exhibits limited vulnerability repair capabilities in both providing and not providing context information. Finally, ChatGPT shows uneven performance in generating CVE descriptions for various CWE types, with limited accuracy in detailed information. Overall, though ChatGPT performs well in some aspects, it still needs improvement in understanding the subtle differences in code vulnerabilities and the ability to describe vulnerabilities in order to fully realize its potential. Our evaluation framework provides valuable insights for further enhancing ChatGPT' s software vulnerability handling capabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑