mirror of
https://github.com/github/codeql.git
synced 2026-03-26 09:18:16 +01:00
- add flowsummaries shared files - register in indentical files - fix initial non-monotonic recursions - add DataFlowSourceCall - add resolvedCall - add SourceParameterNode failing tests: - 3/library-tests/with/test.ql
35 lines
1023 B
Plaintext
35 lines
1023 B
Plaintext
import python
|
|
import semmle.python.dataflow.new.DataFlow
|
|
import semmle.python.dataflow.new.internal.DataFlowPrivate
|
|
import TestUtilities.InlineExpectationsTest
|
|
private import semmle.python.dataflow.new.internal.PrintNode
|
|
|
|
class DataFlowCallTest extends InlineExpectationsTest {
|
|
DataFlowCallTest() { this = "DataFlowCallTest" }
|
|
|
|
override string getARelevantTag() {
|
|
result in ["call", "qlclass"]
|
|
or
|
|
result = "arg_" + [0 .. 10]
|
|
}
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
exists(location.getFile().getRelativePath()) and
|
|
exists(DataFlowSourceCall call |
|
|
location = call.getLocation() and
|
|
element = call.toString()
|
|
|
|
|
value = prettyExpr(call.getNode().getNode()) and
|
|
tag = "call"
|
|
or
|
|
value = call.getAQlClass() and
|
|
tag = "qlclass"
|
|
or
|
|
exists(int n, DataFlow::Node arg | arg = call.getArg(n) |
|
|
value = prettyNodeForInlineTest(arg) and
|
|
tag = "arg_" + n
|
|
)
|
|
)
|
|
}
|
|
}
|