Skip to content
Review

An Empirical Analysis of CodeQL False Positives and Query Refinements for Java Vulnerabilities

Sep 2026 · arXiv.org · Vol abs/2609.04535 · 2 citations · 47 references
Computer Science

TL;DR

These results support a refinement-oriented SAST workflow in which recurring false positives are modeled in CodeQL queries and automatically adapted to different project contexts, reducing repeated triage.

Abstract

Static application security testing (SAST) tools help developers find vulnerabilities before deployment, but false positives create substantial triage effort. We study whether CodeQL false positives in Java security analysis form recurring, explainable patterns that can be reduced by refining the analysis. We run CodeQL's Java security query suite on 167 CVE instances from 110 projects, focusing on the ten queries with the highest false positive rates. We manually review 500 sampled false positive paths and locations and construct a source-level taxonomy. The five categories are Missed Path Constraint or Sanitization (36.6%), Benign Execution Context (29.4%), Missing Trust Boundary Modeling (27.6%), Imprecise Concurrency Modeling (5%), and Imprecise Sink Modeling (1.4%). Guided by these findings, we implement CodeQL refinements that detect and filter recurring false positive patterns at the query level. The refinements remove 81.8% of reviewed false positives. Across the full selected-query dataset, they remove 15.8% of reported paths and locations while retaining 7 of 8 true positives. This shows that many false positives can be reduced in the analysis, although fixed refinements often depend on project-specific context. To address this generalization gap, we evaluate whether agentic coding tools can adapt refinement patterns to new projects. Given our patterns as templates, the two tools succeed on 56% and 62% of tasks, with query compile-pass rates above 90%. Without this guidance, both succeed on only 28%, while compile rates fall to 30-36%. These results support a refinement-oriented SAST workflow in which recurring false positives are modeled in CodeQL queries and automatically adapted to different project contexts, reducing repeated triage.

View source

Similar papers

Conference Open access Sep 2026

Empowering Large Language Models with Static Analysis for Effective Vulnerability Detection

Web applications are pervasive and security-critical, making accurate vulnerability detection essential for protecting sensitive data and service integrity. Although static analysis tools (SATs) are widely used for vulnerability detection, they often suffer from high false positive (FP) rates and limited adaptability t...

Rafael Ramires, Ana Respício, Mike Papadakis et al. · 0 citations
Open access Oct 2026

A HYBRID DETECTION FRAMEWORK FOR SQL INJECTION: REDUCING FALSE POSITIVES THROUGH SIMILARITY-BASED PATTERN MATCHING AND PROACTIVE DEVELOPER INTEGRATION

SQL injection (SQLi) is a persistent and critical vulnerability in web applications that allows attackers to manipulate databases, access sensitive data, and disrupt services. Existing detection tools face challenges such as high false positive rates, limited effectiveness against obfuscated attacks, and poor integrati...

A. I. Oladipo, F. Adamu-Fika, K. B. Shehu et al. · 0 citations
Open access Oct 2026

“Wait, My Tool Can’t Do That?” A Fine-Grained Capability Study of Modern Static Taint Analyzers

Static taint analyzers are widely used in software security, yet aggregate vulnerability-detection metrics provide limited insight into the specific language constructs and analysis capabilities that cause tools to succeed or fail. This paper presents xAST, a fine-grained benchmark containing 844 paired capability case...

Yan-Jie Zhao, Shen-Ao Wang, Jian Zhao et al. · 0 citations
Sep 2026

Python Import as an Execution Boundary: An Empirical Study of Bugs, Vulnerabilities, and Analysis Gaps

A study of import-related bugs and security vulnerabilities in Python software, which combines security advisories with PyPI project histories and uses source and patch evidence to confirm how import activates cases, why the problem occurs, how developers fix it, and what program information is needed to explain the be...

Bai-Hong Chen, Wen Li · 0 citations

Metrics Failure in LLM-Based Code Vulnerability Repair: An Empirical Study and a Change-Aware Screen

It is argued that compile rate is a scientifically unreliable metric for single-function vulnerability repair, and this is supported with five controlled experiments over 203 vulnerable functions from Big-Vul, three open-source code LLMs (350M to 6.7B parameters), and three prompting strategies.

Om Nepal, Sushant Aryal, Oluseyi Olukola et al. · 0 citations
#software testing Preprint Oct 2026

Combining LLM and Dynamic Analysis for Universal Testing of Static Application Security Testing Tools

LLM4SAST is presented, the first universal framework detecting faults in SAST tools using large language models and dynamic feedback, and its key insight is leveraging LLMs to understand and transform code in diverse programming languages.

Huai-En Zhang, Yu Pei, Hao Chen et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.