LLM-Assisted Static Analysis for Detecting Security Vulnerabilities

Ziyang Li, Saikat Dutta, Mayur Naik
5/1/2024

No official code found. Best implementation: iris-sast/iris (404 stars, MIT, last commit 2026-04-19). 1 more below.

Abstract

Software is prone to security vulnerabilities. Program analysis tools to detect them have limited effectiveness in practice due to their reliance on human labeled specifications. Large language models (or LLMs) have shown impressive code generation capabilities but they cannot do complex reasoning over code to detect such vulnerabilities especially since this task requires whole-repository analysis. We propose IRIS, a neuro-symbolic approach that systematically combines LLMs with static analysis to perform whole-repository reasoning for security vulnerability detection. Specifically, IRIS leverages LLMs to infer taint specifications and perform contextual analysis, alleviating needs for human specifications and inspection. For evaluation, we curate a new dataset, CWE-Bench-Java, comprising 120 manually validated security vulnerabilities in real-world Java projects. A state-of-the-art static analysis tool CodeQL detects only 27 of these vulnerabilities whereas IRIS with GPT-4 detects 55 (+28) and improves upon CodeQL's average false discovery rate by 5% points. Furthermore, IRIS identifies 4 previously unknown vulnerabilities which cannot be found by existing tools. IRIS is available publicly at https://github.com/iris-sast/iris.

View on arXivView PDF

Code Implementations(2)

iris-sast/irisCommunity100%
MIT

A neurosymbolic framework for vulnerability detection in code

40456CSS, HTMLDec 10, 20246 months agoMIT
codeqlstatic-analysisvulnerability-detection

Inspired by IRIS LLM-Assisted Static Analysis for Detecting Security Vulnerabilities

00Shell, CodeQLAug 2, 20251 years ago

Similar Papers

Cite this paper

@article{li2024llmassisted,
  title  = {LLM-Assisted Static Analysis for Detecting Security Vulnerabilities},
  author = {Ziyang Li and Saikat Dutta and Mayur Naik},
  year   = {2024},
  eprint = {2405.17238},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2405.17238},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.17238.svg)](https://codeofpaper.com/paper/2405.17238)

Discussion