When Static Reachability Says No: Checking Joern-Based Negative Verdicts for Python Against Execution
Abstract
A negative reachability verdict removes a finding from human review. We check such verdicts against execution. Our pipeline, SourceLens, maps Semgrep findings to a Python program's call graph, whose edges a query takes from the calls that Joern links in its code property graph. We ran two command-line programs from the PyCG macro-benchmark, in which the benchmark's manual call graph and Joern disagree, under coverage and recorded the calls between their functions. On these edges, 123 functions of asciinema are unreachable from the program's entry points. The project's own integration script executes 86 of them, and all our runs 113. In Sublist3r, 19 of 24 are executed. The latest Joern release gives the same verdicts. The missing calls go through values, such as classes and functions passed around, or have no call expression, as in with blocks and property reads. In asciinema, four missing edges make 50 of the 113 executed functions reachable. The manual call graphs also lack observed calls, in asciinema many of them property reads and with blocks, which the benchmark may not count as calls. A rule that turns negative verdicts into unknown recovers 62 of the 113 and 15 of the 19, mostly through dunder and private method names. It recovers 0 of the 5 security findings with a negative verdict, all in executed functions. Its selectivity cannot be measured, as only 10 and 5 negative verdicts were not executed, and under library entry-point models it degrades every negative verdict.
Create a lesson
Metadata
- Categories
- cs.SE, cs.CR
- Comments
- 8 pages, 5 tables. Artifact: https://doi.org/10.5281/zenodo.23554742
Related papers
Right Verdict, Right Reason? An Execution-Grounded Study of Whether LLM Vulnerability Detectors Understand Vulnerabilities
Shared title terminologycs.SELeizhen Zhang, Sheng Chen
Prompt Less, Infer More: Static Analysis-Guided LLM Type Annotation for Python
Shared title terminologycs.SEWonseok Oh, Michael Pradel, Hakjoo Oh
Below the Stopwatch: Checking the Performance Claims of Coding Agents in the Kernel
Shared title terminologycs.SEYuvraj Sehgal, Sneh Patel, Mahsa Panahandeh et al.
Interrupt-Aware Static Detection of Deadlocks in Rust Operating Systems
Shared title terminologycs.SEYuzhi Li, Hongliang Tian, Chengjun Chen et al.
Agentic Root Cause Reasoning and Localization of Unsoundness in Static Call Graph Analysis
Shared title terminologycs.SEMohammad Rafieian, Michael Hicks, Shiyi Wei
The Defect Is in the Arithmetic Between the Files: Static Detection of Exactly-Once Violations in Payment Pipelines
Shared title terminologycs.SEAbhishek Sharma