A Collaborative Software Vulnerability Detection Method Based on Large Language Models and Static Analysis
Software vulnerability detection is a key step in ensuring software security. Static code analysis tools offer broad coverage and easy integration, but have relatively high false-positive rates, requiring security personnel to invest substantial effort in manual screening. Direct detection with a large language model (LLM), although capable of strong code comprehension, tends to over-report, and its decision process lacks interpretability. To address these problems, this study proposes a collaborative software vulnerability detection method using static analysis and an LLM. First, the static analysis tool Semgrep scans source code to recall candidate alerts. DeepSeek then semantically reviews each alert to filter false positives. Experimental results on the Open Worldwide Application Security Project (OWASP) Benchmark dataset show that, compared with static analysis alone, the proposed method increases precision from 65.7% to 84.8% and reduces the false-positive rate from 39.2% to 13.1%, while recall decreases by only about 2 percentage points. Compared with the LLM-only method, the false-positive rate decreases from 72.0% to 16.1%. These results show that collaboration between static analysis and an LLM can effectively reduce the false-positive rate at a small cost in recall, providing empirical evidence for applying LLMs to code security.
Authors
- Daiqi Li
Institutions
- Nanchang University (CN)
Publication Details
- Journal
- Computers and artificial intelligence.
- Published
- 2026-12-03
- DOI
- https://doi.org/10.70267/cai.v3n8.6076
- Primary Topic
- Web Application Security Vulnerabilities
- Type
- article
- Field-Weighted Citation Impact
- 0.00