mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
If we only look at the dispatch receiver, these show up like `this` references rather than `super` references, preventing flow through super-calls. The super-interface case requires properly noting that interface methods with a body get a `default` modifier in order to avoid QL discarding the method as a possible callee.
19 lines
461 B
Plaintext
19 lines
461 B
Plaintext
import java
|
|
import semmle.code.java.dataflow.DataFlow
|
|
|
|
class Config extends DataFlow::Configuration {
|
|
Config() { this = "abc" }
|
|
|
|
override predicate isSource(DataFlow::Node n) {
|
|
n.asExpr().(MethodAccess).getMethod().getName() = "source"
|
|
}
|
|
|
|
override predicate isSink(DataFlow::Node n) {
|
|
n.asExpr().(Argument).getCall().getCallee().getName() = "sink"
|
|
}
|
|
}
|
|
|
|
from Config c, DataFlow::Node n1, DataFlow::Node n2
|
|
where c.hasFlow(n1, n2)
|
|
select n1, n2
|