arXiv:2610.39504cs.SEOct 2026

Manuscript Offprint

arXiv:2610.39504

When Static Reachability Says No: Checking Joern-Based Negative Verdicts for Python Against Execution

Artur Zięba-Kozarzewski, Bartosz Grzegorzewski

Artur Zieba-Kozarzewski

KRYPTON Polska Sp. z o.o.

a.zieba@krypton-polska.com

ORCID: 0000-0003-4696-4983

Bartosz Grzegorzewski

KRYPTON Polska Sp. z o.o. (work done as an intern)

bartoszgrzegorzewski@gmail.com

ORCID: 0009-0002-7696-3308

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.

Index Terms—reachability analysis, call graphs, Python, Joern, dynamic analysis, vulnerability management

I. INTRODUCTION

Dependency scanners match component versions against vulnerability databases and report many vulnerabilities in code that a project never executes. Zhou et al. report a 92.0% false-positive rate for SBOM-based scanning on manually audited repositories and show that checking whether the vulnerable functions are used, in their experiment through coverage, removes 61.9% of these false positives [1]. Reachability analysis is therefore attractive as a filter. Its output, however, is not neutral. A verdict that a finding is not reachable is an instruction to stop looking at it. A vulnerable library function is reachable only through a path from the application's entry points to the call site that invokes it, and that path runs through the application's own call graph.

Static call graphs are incomplete in practice [2]–[4], and Python makes many calls through attributes, decorators and values passed around. To learn how often a negative verdict is wrong, one needs a reference for the negative class. A second static call graph is a weak reference, because it can miss the same calls. Execution is a one-sided reference. A function that runs is reachable, so every executed function with a negative verdict is an error, and the count is a lower bound.

We check negative verdicts on the application’s own call graph. We built SourceLens, a pipeline that maps Semgrep findings in the application’s code to a Joern call graph and returns a three-valued verdict: reachable, not_reachable or unknown. A degradation rule turns a negative verdict into unknown when evidence about the specific target suggests that the graph is incomplete around it. We ran two programs of the PyCG macro-benchmark [5], asciinema and Sublist3r, under coverage, recorded the calls between their functions, and ask three questions:

• RQ1. How many negative reachability verdicts does execution contradict?

• RQ2. Which missing call edges cause the contradicted verdicts?

• RQ3. How many contradicted verdicts does a degradation rule with target-local signals recover?

In both programs, most negative verdicts are contradicted. The missing edges are calls whose callee is a value, and calls that have no call expression. Because one missing edge cuts off everything below it, a handful of call sites decide the verdicts of dozens of functions. The manually built call graphs of the benchmark also lack observed calls. In Sublist3r, these are calls through self to overriding methods; in asciinema, many are property reads and with blocks, which the benchmark may not count as calls. Used as a reference, they agree with many of the contradicted verdicts. The rule recovers about half of the contradicted verdicts in asciinema, mostly through dunder and private method names, none of the property reads and none of the security findings. Because few negative verdicts remain uncontradicted, we cannot measure whether the rule is selective.

The paper contributes:

• A check of Joern-based negative reachability verdicts for two Python programs against execution, with lower bounds on the errors, and the same negative verdicts under a second Joern release.

• An attribution of the errors to missing call edges of a few syntactic kinds, measured on observed calls, with an ablation, the cascade of single edges, and minimal test cases on two Joern releases.

• An evaluation of a target-local degradation rule against execution.

Scenarios, coverage data, call traces, test cases and code are available as an artifact [6].

References (31)