mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Make taint tracking tests use config from InlineFlowTest
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
failures
|
||||
edges
|
||||
| test.go:14:8:14:15 | call to source | test.go:15:34:15:35 | fi |
|
||||
| test.go:15:2:15:44 | ... := ...[0] | test.go:16:7:16:12 | header |
|
||||
|
||||
@@ -1,22 +1,10 @@
|
||||
/**
|
||||
* @kind path-problem
|
||||
*/
|
||||
|
||||
import go
|
||||
import DataFlow::PathGraph
|
||||
import TestUtilities.InlineFlowTest
|
||||
|
||||
class Config extends TaintTracking::Configuration {
|
||||
Config() { this = "config" }
|
||||
module Flow = TaintTracking::Global<DefaultFlowConfig>;
|
||||
|
||||
override predicate isSource(DataFlow::Node n) {
|
||||
n = any(DataFlow::CallNode call | call.getTarget().getName() = "source").getResult()
|
||||
}
|
||||
import Flow::PathGraph
|
||||
|
||||
override predicate isSink(DataFlow::Node n) {
|
||||
n = any(DataFlow::CallNode call | call.getTarget().getName() = "sink").getAnArgument()
|
||||
}
|
||||
}
|
||||
|
||||
from DataFlow::PathNode source, DataFlow::PathNode sink, Config c
|
||||
where c.hasFlowPath(source, sink)
|
||||
from Flow::PathNode source, Flow::PathNode sink
|
||||
where Flow::flowPath(source, sink)
|
||||
select source, source, sink, "Path"
|
||||
|
||||
Reference in New Issue
Block a user