Skip to main content
QUICK REVIEW

[論文レビュー] Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detection

Xin Zhou, Dat Tran|arXiv (Cornell University)|Jul 23, 2024
Software Reliability and Analysis Research被引用数 4
ひとこと要約

本研究では、Java、C、Pythonにおけるリポジトリレベルの脆弱性検出について、15種類のSASTツールと12種類のLLMを比較した。SASTツールは低検出率で誤検出が少ないが、LLMは90–100%の検出率を達成するが誤検出率が高くなる。両者を統合することで、それぞれの欠点を補い、全体的な性能が向上する。

ABSTRACT

Software vulnerabilities pose significant security challenges and potential risks to society, necessitating extensive efforts in automated vulnerability detection. There are two popular lines of work to address automated vulnerability detection. On one hand, Static Application Security Testing (SAST) is usually utilized to scan source code for security vulnerabilities, especially in industries. On the other hand, deep learning (DL)-based methods, especially since the introduction of large language models (LLMs), have demonstrated their potential in software vulnerability detection. However, there is no comparative study between SAST tools and LLMs, aiming to determine their effectiveness in vulnerability detection, understand the pros and cons of both SAST and LLMs, and explore the potential combination of these two families of approaches. In this paper, we compared 15 diverse SAST tools with 12 popular or state-of-the-art open-source LLMs in detecting software vulnerabilities from repositories of three popular programming languages: Java, C, and Python. The experimental results showed that SAST tools obtain low vulnerability detection rates with relatively low false positives, while LLMs can detect up 90\% to 100\% of vulnerabilities but suffer from high false positives. By further ensembling the SAST tools and LLMs, the drawbacks of both SAST tools and LLMs can be mitigated to some extent. Our analysis sheds light on both the current progress and future directions for software vulnerability detection.

研究の動機と目的

  • リポジトリレベルの脆弱性検出におけるSASTツールとLLMの間の比較研究が不足しているという問題に対処すること。
  • SASTツールとLLMの両方に対応可能な、新しいリポジトリレベルの脆弱性検出タスクを策定すること。
  • Java、C、Python用に、脆弱なリポジトリの完全なソースコードを含む3つの新しいデータセットを構築・収集すること。
  • 多様なLLMと適応技術をサポートする統一された評価フレームワークを構築すること。
  • 複数のプログラミング言語にまたがる現実世界の環境において、SASTツールとLLMの有効性、強み、限界を実証的に比較すること。

提案手法

  • モデルが個々の関数ではなく、完全なリポジトリ全体の脆弱性を特定する、新しいリポジトリレベルの脆弱性検出タスクを策定した。
  • 脆弱なリポジトリの完全なソースコードとラベル付き脆弱性を含む3つの新しいデータセット—VulnRepo-Java、VulnRepo-C、VulnRepo-Python—を収集した。
  • すべての3言語で標準的なスキャン設定を使用して、15種類の多様なSASTツールを評価した。
  • リポジトリレベルの検出タスクに対して、複数のプロンプティング戦略(ゼロショット、Few-shot、チェーン・オブ・トゥークン)と微調整を用いて、12種類のオープンソースLLMを評価した。
  • SASTツールとLLMの予測を統合することで、個々の欠点を補い、性能を向上させるアンサンブル手法を適用した。
  • 検出率、誤検出率、F1スコアといった標準的な指標を用いて、ツールやモデル間の性能を比較した。

実験結果

リサーチクエスチョン

  • RQ1Java、C、Pythonにおいて、SASTツールとLLMはリポジトリレベルの脆弱性検出でどのように比較されるか?
  • RQ2実際のリポジトリに適用した際、SASTツールとLLMの検出率と誤検出率はそれぞれどの程度か?
  • RQ3アンサンブル手法を用いてSASTツールとLLMを統合することで、全体的な脆弱性検出性能が向上するか?
  • RQ4異なるLLMアーキテクチャとプロンプティング戦略は、リポジトリレベルの脆弱性検出における性能にどのように影響するか?
  • RQ5現実世界の多言語環境において、SASTツールとLLMの主な強みと限界は何か?

主な発見

  • SASTツールは低検出率であったが、誤検出率が低く、高精度(高精度)である一方で、再現率が低かった。
  • LLMはすべての3つのプログラミング言語で90%~100%の検出率を達成し、高再現率を示したが、誤検出率が高かった。
  • SASTツールとLLMのアンサンブルにより、誤検出率が低減した一方で、高い検出率を維持し、個々のアプローチよりもF1スコアが向上した。
  • LLMの性能はプロンプティング戦略によって顕著に異なり、チェーン・オブ・トゥークンプロンプティングがゼロショットやFew-shotプロンプティングよりも優れた結果を示した。
  • 本研究は、Python脆弱性検出におけるSASTツールの評価を初めて行ったものであり、この言語における独自の課題を明らかにした。
  • 収集したデータセット—VulnRepo-Java、VulnRepo-C、VulnRepo-Python—は、今後のリポジトリレベルの脆弱性検出研究の新しいベンチマークを提供する。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。