You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Idea: not multiplying methods and merge barrier function
predicate isBarrier(DataFlow::Node node, FlowState state) {
exists(MethodCall ma |
ma = node.asExpr() and
(
exists(Expr e | e = ma.getAnArgument() and e instanceof ParameterOperation) or
ma.getCaller().getName() > state.getName()
)
)
}
The query uses node.asExpr().(MethodCall) inside both isSource and isSink. Java's CodeQL dataflow library does not create a DataFlow::Node for expressions whose value is void so there is no value to flow. Empirically confirmed with a probe over the test database.
The problem is the fix if we want to keep the path query because wee need to keep a DataFlow::Node but we must anchor it somehow differently... I have not yet found a working solution.
Activity
evandowning commentedon Apr 17, 2026
This query also didn't find this recursion bug: NationalSecurityAgency/ghidra#9120
Commit: https://github.com/NationalSecurityAgency/ghidra/tree/08d4fcba59f0749f3e8584720aaa3c5f9342483f
Reproducing:
codeql database create database-ghidra.db --language=java -s ~/Downloads/ghidra/ codeql database analyze database-ghidra.db --format=sarif-latest --output=./ghidra.sarif -- trailofbits/java-queriesDarkaMaul commentedon Apr 22, 2026
Ok I've triaged this with Claude help.
The query uses
node.asExpr().(MethodCall)inside bothisSourceandisSink. Java's CodeQL dataflow library does not create aDataFlow::Nodefor expressions whose value isvoidso there is no value to flow. Empirically confirmed with a probe over the test database.The problem is the fix if we want to keep the path query because wee need to keep a
DataFlow::Nodebut we must anchor it somehow differently... I have not yet found a working solution.