CodeQL finds 171 CVEs but loses detections after tool updates
CodeQL can detect many known vulnerabilities before they are fixed, yet its detection coverage is not monotonic across versions
Security & privacy arXiv 8 May 2026 Measurement Real-world evidence
Published as “Longitudinal Analyses of SAST Tools: A CodeQL Case Study”
Why it matters
CodeQL can catch some high-severity vulnerabilities before they are fixed, but its low overall detection rate and unstable coverage mean developers must combine it with other defenses and stay aware of version changes.
Summary
CodeQL detected 171 CVEs in a study of 3,993 CVEs across 1,622 OSS repositories, and 83 of those could have been identified before the fix was committed; however, detections are not monotonic-21 CVEs were lost in later versions and 17 were never redetected-showing limited and unstable coverage despite the large scale of analysis.
What they found 2
- CodeQL identified 171 CVEs, with 83 detectable before the fix.
“We find that CodeQL identifies a total of 171 CVEs, and that for 83 of them, a CodeQL version prior to the fix could detect it.”
- For half of the detections, alerts are concentrated in the vulnerable file.
“as for 50% of the 171 detections, more than 50% of findings in the vulnerable file are located in the vulnerable location.”
Caveats 6
- Out of the 3,851 CVEs that were analyzed, 171 were detected. While this number could be seen as low (about 10%)
- the median percentage of alerts in the right file is close to 10%
- alerts are generally scattered across the codebase, but very close to the vulnerable lines given the vulnerable file.
- Further, we observed many breaking changes in versions prior to v2.7.0 leading to a significant number of failed analyses. Therefore, we left these versions out of scope of this study to ensure that they are evaluated on the same corpus.
- We note that versions prior to v2.4.0 are not properly documented (e.g., no changelogs), likely due to the transition from Semmle to GitHub.
- We consider it out-of-scope but acknowledge that this improves the usability of CodeQL.
What’s new here 4
- First longitudinal evaluation of a SAST tool across 114 versions over several years.
- Actionability assessment using project- and file-level locality metrics.
- Stability analysis of vulnerability detections across tool releases.
- Scale of measurement: >20 billion lines of code, ~3 M alerts, and 100 k+ tool executions.