mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Python: fix QL alerts
This commit is contained in:
@@ -13,7 +13,7 @@ class DataFlowTest extends FlowTest {
|
||||
}
|
||||
}
|
||||
|
||||
query predicate missingAnnotationOnSINK(Location location, string error, string element) {
|
||||
query predicate missingAnnotationOnSink(Location location, string error, string element) {
|
||||
error = "ERROR, you should add `# $ MISSING: flow` annotation" and
|
||||
exists(DataFlow::Node sink |
|
||||
exists(DataFlow::CallCfgNode call |
|
||||
|
||||
@@ -49,12 +49,6 @@ abstract class RoutingTest extends InlineExpectationsTest {
|
||||
|
||||
pragma[inline]
|
||||
private string toFunc(DataFlow::Node toNode) {
|
||||
result =
|
||||
toNode
|
||||
.getEnclosingCallable()
|
||||
.(DataFlowPrivate::DataFlowCallable)
|
||||
.getCallableValue()
|
||||
.getScope()
|
||||
.getQualifiedName() // TODO: More robust pretty printing?
|
||||
result = toNode.getEnclosingCallable().getCallableValue().getScope().getQualifiedName() // TODO: More robust pretty printing?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* s = SOURCE
|
||||
* SINK(s)
|
||||
* ```
|
||||
* `SOURCE` will be a source and the second occurance of `s` will be a sink.
|
||||
* `SOURCE` will be a source and the second occurrence of `s` will be a sink.
|
||||
*
|
||||
* In order to test literals, alternative sources are defined for each type:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user