|
16 | 16 | */ |
17 | 17 |
|
18 | 18 | import codeql.ruby.DataFlow |
19 | | -import codeql.ruby.TaintTracking |
20 | | -import codeql.ruby.dataflow.RemoteFlowSources |
21 | | -import codeql.ruby.dataflow.BarrierGuards |
22 | | -import DataFlow::PathGraph |
23 | 19 | import codeql.ruby.security.KernelOpenQuery |
24 | | - |
25 | | -class Configuration extends TaintTracking::Configuration { |
26 | | - Configuration() { this = "KernelOpen" } |
27 | | - |
28 | | - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } |
29 | | - |
30 | | - override predicate isSink(DataFlow::Node sink) { |
31 | | - sink = any(AmbiguousPathCall r).getPathArgument() |
32 | | - } |
33 | | - |
34 | | - override predicate isSanitizer(DataFlow::Node node) { |
35 | | - node instanceof StringConstCompareBarrier or |
36 | | - node instanceof StringConstArrayInclusionCallBarrier or |
37 | | - node instanceof Sanitizer |
38 | | - } |
39 | | -} |
| 20 | +import KernelOpenFlow::PathGraph |
40 | 21 |
|
41 | 22 | from |
42 | | - Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink, |
43 | | - DataFlow::Node sourceNode, DataFlow::CallNode call |
| 23 | + KernelOpenFlow::PathNode source, KernelOpenFlow::PathNode sink, DataFlow::Node sourceNode, |
| 24 | + DataFlow::CallNode call |
44 | 25 | where |
45 | | - config.hasFlowPath(source, sink) and |
| 26 | + KernelOpenFlow::flowPath(source, sink) and |
46 | 27 | sourceNode = source.getNode() and |
47 | 28 | call.getArgument(0) = sink.getNode() |
48 | 29 | select sink.getNode(), source, sink, |
|
0 commit comments