mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Before, results from `dca` would look something like
## + py/meta/alerts/remote-flow-sources-reach
- django/django@c2250cf_cb8f: tests/messages_tests/urls.py:38:16:38:48
reachable with taint-tracking from RemoteFlowSource
- django/django@c2250cf_cb8f: tests/messages_tests/urls.py:38:9:38:12
reachable with taint-tracking from RemoteFlowSource
now it should make it easier to spot _what_ it is that actually changed,
since we pretty-print the node.
19 lines
606 B
Plaintext
19 lines
606 B
Plaintext
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
private import semmle.python.dataflow.new.internal.PrintNode
|
|
|
|
query predicate conjunctive_lookup(
|
|
DataFlow::MethodCallNode methCall, string call, string object, string methodName
|
|
) {
|
|
call = prettyNode(methCall) and
|
|
object = prettyNode(methCall.getObject()) and
|
|
methodName = methCall.getMethodName()
|
|
}
|
|
|
|
query predicate calls_lookup(
|
|
DataFlow::MethodCallNode methCall, string call, string object, string methodName
|
|
) {
|
|
call = prettyNode(methCall) and
|
|
exists(DataFlow::Node o | methCall.calls(o, methodName) and object = prettyNode(o))
|
|
}
|