How can I get all different paths to specific method?
import csharp
import DataFlow::PathGraph
class TaintTrackingConfiguration extends TaintTracking::Configuration {
TaintTrackingConfiguration() { this = "TaintTrackingConfiguration" }
override predicate isSource(DataFlow::Node source) {
exists(MethodAccess ma | ma = source.asExpr().(MethodAccess))
}
override predicate isSink(DataFlow::Node sink) {
exists(MethodAccess ma | ma.getTarget().getName() = "MyMethodName")
}
}
from DataFlow::PathNode source, DataFlow::PathNode sink, TaintTrackingConfiguration c
where c.hasFlow(source.getNode(), sink.getNode())
select source.getNode(), source, sink, "A -> $@ -> B", sink.getNode(), "CCC"
tried to get a tree like paths to specific method