Help with query - unable to find path #867
Replies: 1 comment 1 reply
|
Data flow doesn't go automatically from operands to I tested the query works with either one of these changes:
Another hint both for debugging and reporting: when facing a query that doesn't show what you want, apart from debugging the query itself you can also simplify the code on which you run it on, which when posted makes it also easier for people helping you out. In this case for example this was all that really mattered for the query: String foo(String target) {
return "redirect:" + target;
}As for how to use quick evaluation on text selections, those text selection must be valid CodeQL terms. For example, selecting |

👋 @akanksha1331
Data flow doesn't go automatically from operands to
+on strings, as opposed to taint tracking which instead adds that step.I tested the query works with either one of these changes:
DataFlowtoTaintTracking(import semmle.code.java.dataflow.TaintTrackingandmodule Flow = TaintTracking::Global<MyFlowConfiguration>AddExpr, but its operand (which seems slightly more idiomatic for data flow, as typically sinks are arguments or operands):