Skip to main content
QUICK REVIEW

[논문 리뷰] IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilities

Ziyang Li, Saikat Dutta|arXiv (Cornell University)|2024. 05. 27.
Software Reliability and Analysis Research인용 수 14
한 줄 요약

IRIS는 LLM과 정적 taint 분석을 결합하여 Java에서 전체 리포지토리 취약성 탐지를 수행합니다. LLM으로 CWE-특정 taint 명세를 추론하고 CodeQL을 보강합니다. GPT-4가 최상의 성과를 달성하여 69개의 취약점을 탐지했고(CodeQL의 27과 비교), 거짓 양성을 최대 약 80% 감소시켰습니다.

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.

연구 동기 및 목표

  • 스케일러블한 메서드 수준 분석을 넘어 전체 리포지토리 취약성 탐지의 필요성을 제시합니다.
  • LLM 주도 taint 명세 추론을 정적 taint 분석(CodeQL)과 융합하는 신경-기호 파이프라인을 제안합니다.
  • 현실 세계의 Java 취약점 데이터셋인 CWE-Bench-Java를 큐레이션하여 전체 프로젝트 추론 능력을 평가합니다.
  • CWE-Bench-Java에서 IRIS가 CodeQL보다 취약점 탐지 성능을 개선하고 맥락 기반 LLM 필터링을 통해 거짓 양성을 줄임을 보여줍니다.]
  • method:[
  • Java 프로젝트 데이터 흐름 그래프를 구성하고 정적 분석(CodeQL)을 사용해 후보 API를 추출합니다.
  • LLM에 프롬프트를 제공하고 JSON 형식의 명세를 반환받아 외부/내부 API에 대한 CWE-특정 taint 소스와 싱크를 유추합니다.
  • LLM이 추론한 명세를 CodeQL taint 분석 쿼리로 변환하여 미싱된 데이터 흐름을 탐지합니다.
  • CodeQL을 CWE-특정 쿼리로 실행하여 후보 취약 경로를 얻고, LLM 기반 맥락 분석을 통해 거짓 양성을 필터링합니다.
  • GPT-4, GPT-3.5, Llama 계열, DeepSeekCoder, Mistral, Gemma 등 다양한 LLM에서 CWE-Bench-Java를 평가합니다.
  • 추론된 명세의 정밀도와 맥락 필터링의 효과를 제시하고 분석합니다.]
  • research_questions:[
  • IRIS가 CWE-Bench-Java에서 CodeQL에 비해 얼마나 많은 알려진 취약점을 탐지할 수 있나요?
  • 맥락 분석이 진짜 양성은 희생하지 않으면서 거짓 양성을 얼마나 효과적으로 줄일 수 있나요?
  • 각 CWE에 대해 외부/내부 API의 소스/싱크 명세를 LLM이 얼마나 정확하게 추론할 수 있나요?

제안 방법

  • Build a Java project data-flow graph and extract candidate APIs using static analysis (CodeQL).
  • Infer CWE-specific taint sources and sinks for external/internal APIs by prompting LLMs and returning JSON-formatted specs.
  • Translate LLM-inferred specs into CodeQL taint-analysis queries to detect unsanitized data flows.
  • Run CodeQL with CWE-specific queries to obtain candidate vulnerable paths, then use LLM-based contextual analysis to filter false positives.
  • Evaluate across multiple LLMs (GPT-4, GPT-3.5, Llama variants, DeepSeekCoder, Mistral, Gemma) on CWE-Bench-Java.
  • Present results and analyze precision of inferred specs and the effectiveness of contextual filtering.

실험 결과

연구 질문

  • RQ1How many known vulnerabilities can IRIS detect in CWE-Bench-Java compared to CodeQL?
  • RQ2How effective is the contextual analysis in reducing false positives without sacrificing true positives?
  • RQ3How accurately can LLMs infer source/sink taint specifications for external/internal APIs for each CWE?

주요 결과

  • IRIS detects 69 vulnerabilities on CWE-Bench-Java using GPT-4, which is 42 more than CodeQL (27).
  • GPT-4 generally yields the best performance among tested LLMs, with smaller specialized models (e.g., DeepSeekCoder 8B) also performing strongly (e.g., 67 detections).
  • Contextual analysis reduces the number of reported paths dramatically (up to 81% fewer paths with GPT-4) while preserving true positives.
  • On average, inferred source/sink specifications from GPT-4 and DeepSeekCoder are around 4% of candidates, with GPT-4 achieving higher precision (over 70%) in manual checks.
  • OS Command Injection (CWE-78) remains particularly challenging for many LLMs due to complex gadget-chain patterns, highlighting static-analysis limitations.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.