We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a85ad4e commit be40085Copy full SHA for be40085
2 files changed
rust/ql/test/library-tests/dataflow/sources/InlineFlow.expected
rust/ql/test/library-tests/dataflow/sources/InlineFlow.ql
@@ -0,0 +1,21 @@
1
+import rust
2
+import codeql.rust.dataflow.DataFlow
3
+import codeql.rust.Concepts
4
+import utils.InlineFlowTest
5
+
6
+/**
7
+ * Configuration for flow from any threat model source to an argument of a function called `sink`.
8
+ */
9
+module MyFlowConfig implements DataFlow::ConfigSig {
10
+ predicate isSource(DataFlow::Node source) { source instanceof ThreatModelSource }
11
12
+ predicate isSink(DataFlow::Node sink) {
13
+ any(CallExpr call | call.getExpr().(PathExpr).getPath().toString() = "sink")
14
+ .getArgList()
15
+ .getAnArg() = sink.asExpr()
16
+ }
17
+}
18
19
+module MyFlowTest = TaintFlowTest<MyFlowConfig>;
20
21
+import MyFlowTest
0 commit comments