arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.14434cs.CRcs.AI
收藏

将ChatGPT用作静态应用安全测试工具

Using ChatGPT as a Static Application Security Testing Tool

Research Center for Development of Advanced Technologies(先进技术发展研究中心)

Atieh Bakhshandeh, Abdalsamad Keramatfar, Amir Norouzi, Mohammad Mahdi Chekidehkhoun

AI总结:

本文探究ChatGPT用于Python源代码漏洞检测的可行性,通过提示词输入漏洞数据,在两个数据集上与Bandit、Semgrep、SonarQube三款主流静态安全测试工具对比,发现ChatGPT可降低误报和漏报率,具备相关应用潜力。

摘要:

近年来,人工智能几乎在生活的方方面面都取得了显著发展,其中最具应用前景的领域之一是安全代码审查,目前已有大量基于人工智能的工具和方法被提出。近期,ChatGPT凭借其在遵循指令、提供详细响应方面的出色表现受到了广泛关注。鉴于自然语言与代码之间的相似性,本文研究了使用ChatGPT检测Python源代码中漏洞的可行性。为实现这一目标,我们向ChatGPT输入合适的提示词及含漏洞的数据,并将其在两个数据集上的结果与三款广泛使用的静态应用安全测试工具(Bandit、Semgrep和SonarQube)的结果进行对比。我们针对ChatGPT开展了多种不同的实验,结果表明ChatGPT降低了误报率和漏报率,具备用于Python源代码漏洞检测的潜力。

英文摘要:

In recent years, artificial intelligence has had a conspicuous growth in almost every aspect of life. One of the most applicable areas is security code review, in which a lot of AI-based tools and approaches have been proposed. Recently, ChatGPT has caught a huge amount of attention with its remarkable performance in following instructions and providing a detailed response. Regarding the similarities between natural language and code, in this paper, we study the feasibility of using ChatGPT for vulnerability detection in Python source code. Toward this goal, we feed an appropriate prompt along with vulnerable data to ChatGPT and compare its results on two datasets with the results of three widely used Static Application Security Testing tools (Bandit, Semgrep and SonarQube). We implement different kinds of experiments with ChatGPT and the results indicate that ChatGPT reduces the false positive and false negative rates and has the potential to be used for Python source code vulnerability detection.

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

↑