From 46f73c3fe266b39f2687f4210eaa9c62a0118cda Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 17 Mar 2021 15:47:07 +0100 Subject: [PATCH] C#: Add data flow tests for various pattern types --- .../dataflow/tuples/DataFlowStep.expected | 364 +++++++++++++++++ .../dataflow/tuples/MixedPatterns.cs | 72 ++++ .../dataflow/tuples/PrintAst.expected | 378 ++++++++++++++++++ .../dataflow/tuples/Tuples.expected | 84 ++++ 4 files changed, 898 insertions(+) create mode 100644 csharp/ql/test/library-tests/dataflow/tuples/MixedPatterns.cs diff --git a/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected b/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected index 99eef2875592..d267b5494c19 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/DataFlowStep.expected @@ -1,3 +1,367 @@ +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:9:52:9:60 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:10:56:10:64 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:13:27:13:33 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:4:17:4:17 | this | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:6:14:6:50 | SSA def(a) | MixedPatterns.cs:7:20:7:20 | access to local variable a | +| MixedPatterns.cs:6:18:6:50 | object creation of type Item | MixedPatterns.cs:6:14:6:50 | SSA def(a) | +| MixedPatterns.cs:6:29:6:50 | { ..., ... } | MixedPatterns.cs:6:18:6:50 | object creation of type Item | +| MixedPatterns.cs:6:35:6:48 | "taint source" | MixedPatterns.cs:6:31:6:48 | ... = ... | +| MixedPatterns.cs:7:20:7:20 | access to local variable a | MixedPatterns.cs:9:13:9:47 | SSA def(z) | +| MixedPatterns.cs:7:20:7:20 | access to local variable a | MixedPatterns.cs:10:13:10:51 | SSA def(z) | +| MixedPatterns.cs:9:13:9:47 | SSA def(z) | MixedPatterns.cs:9:57:9:57 | access to local variable z | +| MixedPatterns.cs:9:13:9:47 | SSA qualifier def(z.X) | MixedPatterns.cs:9:57:9:59 | access to property X | +| MixedPatterns.cs:9:52:9:60 | [post] this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:9:52:9:60 | [post] this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:9:52:9:60 | [post] this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:9:52:9:60 | [post] this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:9:52:9:60 | [post] this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:9:52:9:60 | call to method Sink | MixedPatterns.cs:7:20:14:9 | ... switch { ... } | +| MixedPatterns.cs:9:52:9:60 | this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:9:52:9:60 | this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:9:52:9:60 | this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:9:52:9:60 | this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:9:52:9:60 | this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:10:13:10:51 | SSA def(z) | MixedPatterns.cs:10:61:10:61 | access to local variable z | +| MixedPatterns.cs:10:13:10:51 | SSA qualifier def(z.X) | MixedPatterns.cs:10:61:10:63 | access to property X | +| MixedPatterns.cs:10:56:10:64 | [post] this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:10:56:10:64 | [post] this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:10:56:10:64 | [post] this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:10:56:10:64 | [post] this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:10:56:10:64 | [post] this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:10:56:10:64 | call to method Sink | MixedPatterns.cs:7:20:14:9 | ... switch { ... } | +| MixedPatterns.cs:10:56:10:64 | this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:10:56:10:64 | this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:10:56:10:64 | this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:10:56:10:64 | this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:10:56:10:64 | this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:12:23:12:24 | "" | MixedPatterns.cs:7:20:14:9 | ... switch { ... } | +| MixedPatterns.cs:13:14:13:18 | SSA def(s) | MixedPatterns.cs:13:32:13:32 | access to local variable s | +| MixedPatterns.cs:13:27:13:33 | [post] this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:13:27:13:33 | [post] this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:13:27:13:33 | [post] this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:13:27:13:33 | [post] this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:13:27:13:33 | [post] this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:13:27:13:33 | call to method Sink | MixedPatterns.cs:7:20:14:9 | ... switch { ... } | +| MixedPatterns.cs:13:27:13:33 | this access | MixedPatterns.cs:19:36:19:44 | this access | +| MixedPatterns.cs:13:27:13:33 | this access | MixedPatterns.cs:20:40:20:48 | this access | +| MixedPatterns.cs:13:27:13:33 | this access | MixedPatterns.cs:21:38:21:46 | this access | +| MixedPatterns.cs:13:27:13:33 | this access | MixedPatterns.cs:22:42:22:50 | this access | +| MixedPatterns.cs:13:27:13:33 | this access | MixedPatterns.cs:23:29:23:35 | this access | +| MixedPatterns.cs:16:14:16:50 | SSA def(b) | MixedPatterns.cs:17:20:17:20 | access to local variable b | +| MixedPatterns.cs:16:14:16:50 | SSA qualifier def(b.X) | MixedPatterns.cs:19:41:19:43 | access to property X | +| MixedPatterns.cs:16:14:16:50 | SSA qualifier def(b.X) | MixedPatterns.cs:20:45:20:47 | access to property X | +| MixedPatterns.cs:16:18:16:50 | object creation of type Item | MixedPatterns.cs:16:14:16:50 | SSA def(b) | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } | MixedPatterns.cs:16:18:16:50 | object creation of type Item | +| MixedPatterns.cs:16:35:16:48 | "taint source" | MixedPatterns.cs:16:31:16:48 | ... = ... | +| MixedPatterns.cs:17:20:17:20 | access to local variable b | MixedPatterns.cs:19:41:19:41 | access to local variable b | +| MixedPatterns.cs:17:20:17:20 | access to local variable b | MixedPatterns.cs:20:45:20:45 | access to local variable b | +| MixedPatterns.cs:17:20:17:20 | access to local variable b | MixedPatterns.cs:21:13:21:33 | SSA def(p) | +| MixedPatterns.cs:17:20:17:20 | access to local variable b | MixedPatterns.cs:22:13:22:37 | SSA def(p) | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:19:36:19:44 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:19:36:19:44 | call to method Sink | MixedPatterns.cs:17:20:25:9 | ... switch { ... } | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:19:36:19:44 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:20:40:20:48 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:20:40:20:48 | call to method Sink | MixedPatterns.cs:17:20:25:9 | ... switch { ... } | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:20:40:20:48 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:21:13:21:33 | SSA def(p) | MixedPatterns.cs:21:43:21:43 | access to local variable p | +| MixedPatterns.cs:21:13:21:33 | SSA qualifier def(p.X) | MixedPatterns.cs:21:43:21:45 | access to property X | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:21:38:21:46 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:21:38:21:46 | call to method Sink | MixedPatterns.cs:17:20:25:9 | ... switch { ... } | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:21:38:21:46 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:22:13:22:37 | SSA def(p) | MixedPatterns.cs:22:47:22:47 | access to local variable p | +| MixedPatterns.cs:22:13:22:37 | SSA qualifier def(p.X) | MixedPatterns.cs:22:47:22:49 | access to property X | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:22:42:22:50 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:22:42:22:50 | call to method Sink | MixedPatterns.cs:17:20:25:9 | ... switch { ... } | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:22:42:22:50 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:23:14:23:18 | SSA def(j) | MixedPatterns.cs:23:34:23:34 | access to local variable j | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:23:29:23:35 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:23:29:23:35 | call to method Sink | MixedPatterns.cs:17:20:25:9 | ... switch { ... } | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:30:52:30:60 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:31:56:31:64 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:32:47:32:53 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:34:27:34:33 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:35:63:35:69 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:36:75:36:81 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:37:79:37:85 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:38:66:38:72 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:23:29:23:35 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:27:16:27:52 | SSA def(o) | MixedPatterns.cs:28:20:28:20 | access to local variable o | +| MixedPatterns.cs:27:20:27:52 | object creation of type Item | MixedPatterns.cs:27:16:27:52 | SSA def(o) | +| MixedPatterns.cs:27:31:27:52 | { ..., ... } | MixedPatterns.cs:27:20:27:52 | object creation of type Item | +| MixedPatterns.cs:27:37:27:50 | "taint source" | MixedPatterns.cs:27:33:27:50 | ... = ... | +| MixedPatterns.cs:28:20:28:20 | access to local variable o | MixedPatterns.cs:30:13:30:47 | SSA def(z) | +| MixedPatterns.cs:28:20:28:20 | access to local variable o | MixedPatterns.cs:31:13:31:51 | SSA def(z) | +| MixedPatterns.cs:28:20:28:20 | access to local variable o | MixedPatterns.cs:36:80:36:80 | access to local variable o | +| MixedPatterns.cs:28:20:28:20 | access to local variable o | MixedPatterns.cs:37:84:37:84 | access to local variable o | +| MixedPatterns.cs:30:13:30:47 | SSA def(z) | MixedPatterns.cs:30:57:30:57 | access to local variable z | +| MixedPatterns.cs:30:13:30:47 | SSA qualifier def(z.X) | MixedPatterns.cs:30:57:30:59 | access to property X | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:30:52:30:60 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:30:52:30:60 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:30:52:30:60 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:31:13:31:51 | SSA def(z) | MixedPatterns.cs:31:61:31:61 | access to local variable z | +| MixedPatterns.cs:31:13:31:51 | SSA qualifier def(z.X) | MixedPatterns.cs:31:61:31:63 | access to property X | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:31:56:31:64 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:31:56:31:64 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:31:56:31:64 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:32:13:32:42 | [match] SSA phi(i) | MixedPatterns.cs:32:52:32:52 | access to local variable i | +| MixedPatterns.cs:32:18:32:22 | SSA def(i) | MixedPatterns.cs:32:13:32:42 | [match] SSA phi(i) | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:32:47:32:53 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:32:47:32:53 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:32:47:32:53 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:33:23:33:25 | "0" | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:34:14:34:18 | SSA def(s) | MixedPatterns.cs:34:32:34:32 | access to local variable s | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:34:27:34:33 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:34:27:34:33 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:34:27:34:33 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:35:13:35:58 | [match] SSA phi(i) | MixedPatterns.cs:35:68:35:68 | access to local variable i | +| MixedPatterns.cs:35:34:35:38 | SSA def(i) | MixedPatterns.cs:35:13:35:58 | [match] SSA phi(i) | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:35:63:35:69 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:35:63:35:69 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:35:63:35:69 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:35:68:35:68 | access to local variable i | MixedPatterns.cs:35:68:35:68 | (...) ... | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:36:75:36:81 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:36:75:36:81 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:36:75:36:81 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:37:79:37:85 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:37:79:37:85 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:37:79:37:85 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:38:13:38:61 | [match] SSA phi(i) | MixedPatterns.cs:38:71:38:71 | access to local variable i | +| MixedPatterns.cs:38:37:38:41 | SSA def(i) | MixedPatterns.cs:38:13:38:61 | [match] SSA phi(i) | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:38:66:38:72 | [post] this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:38:66:38:72 | call to method Sink | MixedPatterns.cs:28:20:39:9 | ... switch { ... } | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:44:36:44:50 | this access | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:45:40:45:54 | this access | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:46:75:46:89 | this access | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:47:79:47:93 | this access | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:48:66:48:72 | this access | +| MixedPatterns.cs:38:66:38:72 | this access | MixedPatterns.cs:49:27:49:33 | this access | +| MixedPatterns.cs:41:13:41:37 | SSA def(tup) | MixedPatterns.cs:42:20:42:22 | access to local variable tup | +| MixedPatterns.cs:41:13:41:37 | SSA qualifier def(tup.Item1) | MixedPatterns.cs:44:41:44:49 | access to field Item1 | +| MixedPatterns.cs:41:13:41:37 | SSA qualifier def(tup.Item1) | MixedPatterns.cs:45:45:45:53 | access to field Item1 | +| MixedPatterns.cs:41:13:41:37 | SSA qualifier def(tup.Item1) | MixedPatterns.cs:46:80:46:88 | access to field Item1 | +| MixedPatterns.cs:41:13:41:37 | SSA qualifier def(tup.Item1) | MixedPatterns.cs:47:84:47:92 | access to field Item1 | +| MixedPatterns.cs:41:19:41:37 | (..., ...) | MixedPatterns.cs:41:13:41:37 | SSA def(tup) | +| MixedPatterns.cs:42:20:42:22 | access to local variable tup | MixedPatterns.cs:44:41:44:43 | access to local variable tup | +| MixedPatterns.cs:42:20:42:22 | access to local variable tup | MixedPatterns.cs:45:45:45:47 | access to local variable tup | +| MixedPatterns.cs:42:20:42:22 | access to local variable tup | MixedPatterns.cs:46:80:46:82 | access to local variable tup | +| MixedPatterns.cs:42:20:42:22 | access to local variable tup | MixedPatterns.cs:47:84:47:86 | access to local variable tup | +| MixedPatterns.cs:44:36:44:50 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:45:40:45:54 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:46:75:46:89 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:47:79:47:93 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:48:13:48:61 | [match] SSA phi(i) | MixedPatterns.cs:48:71:48:71 | access to local variable i | +| MixedPatterns.cs:48:37:48:41 | SSA def(i) | MixedPatterns.cs:48:13:48:61 | [match] SSA phi(i) | +| MixedPatterns.cs:48:66:48:72 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:49:14:49:18 | SSA def(i) | MixedPatterns.cs:49:32:49:32 | access to local variable i | +| MixedPatterns.cs:49:27:49:33 | call to method Sink | MixedPatterns.cs:42:20:50:9 | ... switch { ... } | +| MixedPatterns.cs:67:17:67:27 | SSA entry def(this.X) | MixedPatterns.cs:69:13:69:13 | access to property X | +| MixedPatterns.cs:67:17:67:27 | SSA entry def(this.Y) | MixedPatterns.cs:70:13:70:13 | access to property Y | +| MixedPatterns.cs:67:17:67:27 | this | MixedPatterns.cs:69:13:69:13 | this access | +| MixedPatterns.cs:69:13:69:13 | [post] this access | MixedPatterns.cs:70:13:70:13 | this access | +| MixedPatterns.cs:69:13:69:13 | access to property X | MixedPatterns.cs:69:9:69:13 | SSA def(x) | +| MixedPatterns.cs:69:13:69:13 | this access | MixedPatterns.cs:70:13:70:13 | this access | +| MixedPatterns.cs:70:13:70:13 | access to property Y | MixedPatterns.cs:70:9:70:13 | SSA def(y) | | Tuples.cs:7:13:7:56 | SSA def(x) | Tuples.cs:8:27:8:27 | access to local variable x | | Tuples.cs:7:13:7:56 | SSA qualifier def(x.Item1) | Tuples.cs:23:14:23:20 | access to field Item1 | | Tuples.cs:7:13:7:56 | SSA qualifier def(x.Item2) | Tuples.cs:25:14:25:20 | access to field Item2 | diff --git a/csharp/ql/test/library-tests/dataflow/tuples/MixedPatterns.cs b/csharp/ql/test/library-tests/dataflow/tuples/MixedPatterns.cs new file mode 100644 index 000000000000..6fc318c09bd3 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/tuples/MixedPatterns.cs @@ -0,0 +1,72 @@ +using System; +public class C +{ + public void M() + { + Base a = new Item() { X = "taint source" }; + var ret1 = a switch + { + Item("taint source", 1) { Y: 10 } z => Sink(z.X), // [TRUE POSITIVE] + Item("not taint source", 1) { Y: 10 } z => Sink(z.X), // [FALSE POSITIVE] + // these work because Base implements ITuple: + (0, 0) => "", + (var s, 0) => Sink(s), // [FALSE NEGATIVE] + }; + + Item b = new Item() { X = "taint source" }; + var ret2 = b switch + { + ("taint source", 0) => Sink(b.X), // [TRUE POSITIVE] + ("not taint source", 0) => Sink(b.X), // [FALSE POSITIVE] + ("taint source", 3) p => Sink(p.X), // [TRUE POSITIVE] + ("not taint source", 3) p => Sink(p.X), // [FALSE POSITIVE] + (var j, 5) p => Sink(j), // [FALSE NEGATIVE] + // ValueTuple (3,3) t => "3" + t.Item1, // Doesn't work + }; + + object o = new Item() { X = "taint source" }; + var ret3 = o switch + { + Item("taint source", 1) { Y: 10 } z => Sink(z.X), // [TRUE POSITIVE] + Item("not taint source", 1) { Y: 10 } z => Sink(z.X), // [FALSE POSITIVE] + Item(var i, var j) { Y: 10 } z => Sink(i), // [FALSE NEGATIVE] + (0, 0) => "0", + (var s, 1) => Sink(s), // [FALSE NEGATIVE] + ValueTuple(var i, 3) { Item2: 3 } t1 => Sink(i), // not tainted, wrong data type + ValueTuple("taint source", 3) { Item2: 3 } t1 => Sink(o), // [FALSE NEGATIVE] + ValueTuple("not taint source", 3) { Item2: 3 } t1 => Sink(o), // [FALSE NEGATIVE] + ValueTuple(var i, 3) { Item2: 3 } t1 => Sink(i), // [FALSE NEGATIVE] + }; + + var tup = ("taint source", 2); + var ret4 = tup switch + { + ("taint source", 2) => Sink(tup.Item1), // [TRUE POSITIVE] + ("not taint source", 2) => Sink(tup.Item1), // [FALSE POSITIVE] + ValueTuple("taint source", 3) { Item2: 3 } t1 => Sink(tup.Item1), // [TRUE POSITIVE] + ValueTuple("not taint source", 3) { Item2: 3 } t1 => Sink(tup.Item1), // [FALSE POSITIVE] + ValueTuple(var i, 3) { Item2: 3 } t1 => Sink(i), // [FALSE NEGATIVE] + (var i, 5) => Sink(i), // [FALSE NEGATIVE] + }; + } + + public string Sink(Object o) => throw null; +} + +class Base : System.Runtime.CompilerServices.ITuple +{ + public int Length => throw null; + public object this[int c] => throw null; +} + +class Item : Base +{ + public string X { get; set; } + public int Y { get; set; } + + public void Deconstruct(out string x, out int y) + { + x = X; + y = Y; + } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected index 8f1a7c156413..a8a027cbff6e 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected @@ -1,3 +1,381 @@ +MixedPatterns.cs: +# 2| [Class] C +# 4| 5: [Method] M +# 4| -1: [TypeMention] Void +# 5| 4: [BlockStmt] {...} +# 6| 0: [LocalVariableDeclStmt] ... ...; +# 6| 0: [LocalVariableDeclAndInitExpr] Base a = ... +# 6| -1: [TypeMention] Base +# 6| 0: [LocalVariableAccess] access to local variable a +# 6| 1: [ObjectCreation] object creation of type Item +# 6| -2: [TypeMention] Item +# 6| -1: [ObjectInitializer] { ..., ... } +# 6| 0: [MemberInitializer] ... = ... +# 6| 0: [PropertyCall] access to property X +# 6| 1: [StringLiteral] "taint source" +# 7| 1: [LocalVariableDeclStmt] ... ...; +# 7| 0: [LocalVariableDeclAndInitExpr] String ret1 = ... +# 7| -1: [TypeMention] string +# 7| 0: [LocalVariableAccess] access to local variable ret1 +# 7| 1: [SwitchExpr] ... switch { ... } +# 7| -1: [LocalVariableAccess] access to local variable a +# 9| 0: [SwitchCaseExpr] ... => ... +# 9| 0: [RecursivePatternExpr] { ... } +# 9| 0: [VariablePatternExpr] Item z +# 9| 1: [TypeAccessPatternExpr] access to type Item +# 9| 0: [TypeMention] Item +# 9| 2: [PositionalPatternExpr] ( ... ) +# 9| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 9| 1: [ConstantPatternExpr,IntLiteral] 1 +# 9| 3: [PropertyPatternExpr] { ... } +# 9| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 10 +# 9| 2: [MethodCall] call to method Sink +# 9| 0: [PropertyCall] access to property X +# 9| -1: [LocalVariableAccess] access to local variable z +# 10| 1: [SwitchCaseExpr] ... => ... +# 10| 0: [RecursivePatternExpr] { ... } +# 10| 0: [VariablePatternExpr] Item z +# 10| 1: [TypeAccessPatternExpr] access to type Item +# 10| 0: [TypeMention] Item +# 10| 2: [PositionalPatternExpr] ( ... ) +# 10| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 10| 1: [ConstantPatternExpr,IntLiteral] 1 +# 10| 3: [PropertyPatternExpr] { ... } +# 10| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 10 +# 10| 2: [MethodCall] call to method Sink +# 10| 0: [PropertyCall] access to property X +# 10| -1: [LocalVariableAccess] access to local variable z +# 12| 2: [SwitchCaseExpr] ... => ... +# 12| 0: [RecursivePatternExpr] { ... } +# 12| 2: [PositionalPatternExpr] ( ... ) +# 12| 0: [ConstantPatternExpr,IntLiteral] 0 +# 12| 1: [ConstantPatternExpr,IntLiteral] 0 +# 12| 2: [StringLiteral] "" +# 13| 3: [SwitchCaseExpr] ... => ... +# 13| 0: [RecursivePatternExpr] { ... } +# 13| 2: [PositionalPatternExpr] ( ... ) +# 13| 0: [VariablePatternExpr] Object s +# 13| 1: [ConstantPatternExpr,IntLiteral] 0 +# 13| 2: [MethodCall] call to method Sink +# 13| 0: [LocalVariableAccess] access to local variable s +# 16| 2: [LocalVariableDeclStmt] ... ...; +# 16| 0: [LocalVariableDeclAndInitExpr] Item b = ... +# 16| -1: [TypeMention] Item +# 16| 0: [LocalVariableAccess] access to local variable b +# 16| 1: [ObjectCreation] object creation of type Item +# 16| -2: [TypeMention] Item +# 16| -1: [ObjectInitializer] { ..., ... } +# 16| 0: [MemberInitializer] ... = ... +# 16| 0: [PropertyCall] access to property X +# 16| 1: [StringLiteral] "taint source" +# 17| 3: [LocalVariableDeclStmt] ... ...; +# 17| 0: [LocalVariableDeclAndInitExpr] String ret2 = ... +# 17| -1: [TypeMention] string +# 17| 0: [LocalVariableAccess] access to local variable ret2 +# 17| 1: [SwitchExpr] ... switch { ... } +# 17| -1: [LocalVariableAccess] access to local variable b +# 19| 0: [SwitchCaseExpr] ... => ... +# 19| 0: [RecursivePatternExpr] { ... } +# 19| 2: [PositionalPatternExpr] ( ... ) +# 19| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 19| 1: [ConstantPatternExpr,IntLiteral] 0 +# 19| 2: [MethodCall] call to method Sink +# 19| 0: [PropertyCall] access to property X +# 19| -1: [LocalVariableAccess] access to local variable b +# 20| 1: [SwitchCaseExpr] ... => ... +# 20| 0: [RecursivePatternExpr] { ... } +# 20| 2: [PositionalPatternExpr] ( ... ) +# 20| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 20| 1: [ConstantPatternExpr,IntLiteral] 0 +# 20| 2: [MethodCall] call to method Sink +# 20| 0: [PropertyCall] access to property X +# 20| -1: [LocalVariableAccess] access to local variable b +# 21| 2: [SwitchCaseExpr] ... => ... +# 21| 0: [RecursivePatternExpr] { ... } +# 21| 0: [VariablePatternExpr] Item p +# 21| 2: [PositionalPatternExpr] ( ... ) +# 21| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 21| 1: [ConstantPatternExpr,IntLiteral] 3 +# 21| 2: [MethodCall] call to method Sink +# 21| 0: [PropertyCall] access to property X +# 21| -1: [LocalVariableAccess] access to local variable p +# 22| 3: [SwitchCaseExpr] ... => ... +# 22| 0: [RecursivePatternExpr] { ... } +# 22| 0: [VariablePatternExpr] Item p +# 22| 2: [PositionalPatternExpr] ( ... ) +# 22| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 22| 1: [ConstantPatternExpr,IntLiteral] 3 +# 22| 2: [MethodCall] call to method Sink +# 22| 0: [PropertyCall] access to property X +# 22| -1: [LocalVariableAccess] access to local variable p +# 23| 4: [SwitchCaseExpr] ... => ... +# 23| 0: [RecursivePatternExpr] { ... } +# 23| 0: [VariablePatternExpr] Item p +# 23| 2: [PositionalPatternExpr] ( ... ) +# 23| 0: [VariablePatternExpr] String j +# 23| 1: [ConstantPatternExpr,IntLiteral] 5 +# 23| 2: [MethodCall] call to method Sink +# 23| 0: [LocalVariableAccess] access to local variable j +# 27| 4: [LocalVariableDeclStmt] ... ...; +# 27| 0: [LocalVariableDeclAndInitExpr] Object o = ... +# 27| -1: [TypeMention] object +# 27| 0: [LocalVariableAccess] access to local variable o +# 27| 1: [ObjectCreation] object creation of type Item +# 27| -2: [TypeMention] Item +# 27| -1: [ObjectInitializer] { ..., ... } +# 27| 0: [MemberInitializer] ... = ... +# 27| 0: [PropertyCall] access to property X +# 27| 1: [StringLiteral] "taint source" +# 28| 5: [LocalVariableDeclStmt] ... ...; +# 28| 0: [LocalVariableDeclAndInitExpr] String ret3 = ... +# 28| -1: [TypeMention] string +# 28| 0: [LocalVariableAccess] access to local variable ret3 +# 28| 1: [SwitchExpr] ... switch { ... } +# 28| -1: [LocalVariableAccess] access to local variable o +# 30| 0: [SwitchCaseExpr] ... => ... +# 30| 0: [RecursivePatternExpr] { ... } +# 30| 0: [VariablePatternExpr] Item z +# 30| 1: [TypeAccessPatternExpr] access to type Item +# 30| 0: [TypeMention] Item +# 30| 2: [PositionalPatternExpr] ( ... ) +# 30| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 30| 1: [ConstantPatternExpr,IntLiteral] 1 +# 30| 3: [PropertyPatternExpr] { ... } +# 30| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 10 +# 30| 2: [MethodCall] call to method Sink +# 30| 0: [PropertyCall] access to property X +# 30| -1: [LocalVariableAccess] access to local variable z +# 31| 1: [SwitchCaseExpr] ... => ... +# 31| 0: [RecursivePatternExpr] { ... } +# 31| 0: [VariablePatternExpr] Item z +# 31| 1: [TypeAccessPatternExpr] access to type Item +# 31| 0: [TypeMention] Item +# 31| 2: [PositionalPatternExpr] ( ... ) +# 31| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 31| 1: [ConstantPatternExpr,IntLiteral] 1 +# 31| 3: [PropertyPatternExpr] { ... } +# 31| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 10 +# 31| 2: [MethodCall] call to method Sink +# 31| 0: [PropertyCall] access to property X +# 31| -1: [LocalVariableAccess] access to local variable z +# 32| 2: [SwitchCaseExpr] ... => ... +# 32| 0: [RecursivePatternExpr] { ... } +# 32| 0: [VariablePatternExpr] Item z +# 32| 1: [TypeAccessPatternExpr] access to type Item +# 32| 0: [TypeMention] Item +# 32| 2: [PositionalPatternExpr] ( ... ) +# 32| 0: [VariablePatternExpr] String i +# 32| 1: [VariablePatternExpr] Int32 j +# 32| 3: [PropertyPatternExpr] { ... } +# 32| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 10 +# 32| 2: [MethodCall] call to method Sink +# 32| 0: [LocalVariableAccess] access to local variable i +# 33| 3: [SwitchCaseExpr] ... => ... +# 33| 0: [RecursivePatternExpr] { ... } +# 33| 2: [PositionalPatternExpr] ( ... ) +# 33| 0: [ConstantPatternExpr,IntLiteral] 0 +# 33| 1: [ConstantPatternExpr,IntLiteral] 0 +# 33| 2: [StringLiteral] "0" +# 34| 4: [SwitchCaseExpr] ... => ... +# 34| 0: [RecursivePatternExpr] { ... } +# 34| 2: [PositionalPatternExpr] ( ... ) +# 34| 0: [VariablePatternExpr] Object s +# 34| 1: [ConstantPatternExpr,IntLiteral] 1 +# 34| 2: [MethodCall] call to method Sink +# 34| 0: [LocalVariableAccess] access to local variable s +# 35| 5: [SwitchCaseExpr] ... => ... +# 35| 0: [RecursivePatternExpr] { ... } +# 35| 0: [VariablePatternExpr] (Int32,Int32) t1 +# 35| 1: [TypeAccessPatternExpr] access to type (Int32,Int32) +# 35| 0: [TypeMention] (int, int) +# 35| 1: [TypeMention] int +# 35| 2: [TypeMention] int +# 35| 2: [PositionalPatternExpr] ( ... ) +# 35| 0: [VariablePatternExpr] Int32 i +# 35| 1: [ConstantPatternExpr,IntLiteral] 3 +# 35| 3: [PropertyPatternExpr] { ... } +# 35| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 35| 2: [MethodCall] call to method Sink +# 35| 0: [CastExpr] (...) ... +# 35| 1: [LocalVariableAccess] access to local variable i +# 36| 6: [SwitchCaseExpr] ... => ... +# 36| 0: [RecursivePatternExpr] { ... } +# 36| 0: [VariablePatternExpr] (String,Int32) t1 +# 36| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 36| 0: [TypeMention] (string, int) +# 36| 1: [TypeMention] string +# 36| 2: [TypeMention] int +# 36| 2: [PositionalPatternExpr] ( ... ) +# 36| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 36| 1: [ConstantPatternExpr,IntLiteral] 3 +# 36| 3: [PropertyPatternExpr] { ... } +# 36| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 36| 2: [MethodCall] call to method Sink +# 36| 0: [LocalVariableAccess] access to local variable o +# 37| 7: [SwitchCaseExpr] ... => ... +# 37| 0: [RecursivePatternExpr] { ... } +# 37| 0: [VariablePatternExpr] (String,Int32) t1 +# 37| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 37| 0: [TypeMention] (string, int) +# 37| 1: [TypeMention] string +# 37| 2: [TypeMention] int +# 37| 2: [PositionalPatternExpr] ( ... ) +# 37| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 37| 1: [ConstantPatternExpr,IntLiteral] 3 +# 37| 3: [PropertyPatternExpr] { ... } +# 37| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 37| 2: [MethodCall] call to method Sink +# 37| 0: [LocalVariableAccess] access to local variable o +# 38| 8: [SwitchCaseExpr] ... => ... +# 38| 0: [RecursivePatternExpr] { ... } +# 38| 0: [VariablePatternExpr] (String,Int32) t1 +# 38| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 38| 0: [TypeMention] (string, int) +# 38| 1: [TypeMention] string +# 38| 2: [TypeMention] int +# 38| 2: [PositionalPatternExpr] ( ... ) +# 38| 0: [VariablePatternExpr] String i +# 38| 1: [ConstantPatternExpr,IntLiteral] 3 +# 38| 3: [PropertyPatternExpr] { ... } +# 38| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 38| 2: [MethodCall] call to method Sink +# 38| 0: [LocalVariableAccess] access to local variable i +# 41| 6: [LocalVariableDeclStmt] ... ...; +# 41| 0: [LocalVariableDeclAndInitExpr] (String,Int32) tup = ... +# 41| -1: [TypeMention] (string, int) +# 41| 0: [LocalVariableAccess] access to local variable tup +# 41| 1: [TupleExpr] (..., ...) +# 41| 0: [StringLiteral] "taint source" +# 41| 1: [IntLiteral] 2 +# 42| 7: [LocalVariableDeclStmt] ... ...; +# 42| 0: [LocalVariableDeclAndInitExpr] String ret4 = ... +# 42| -1: [TypeMention] string +# 42| 0: [LocalVariableAccess] access to local variable ret4 +# 42| 1: [SwitchExpr] ... switch { ... } +# 42| -1: [LocalVariableAccess] access to local variable tup +# 44| 0: [SwitchCaseExpr] ... => ... +# 44| 0: [RecursivePatternExpr] { ... } +# 44| 2: [PositionalPatternExpr] ( ... ) +# 44| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 44| 1: [ConstantPatternExpr,IntLiteral] 2 +# 44| 2: [MethodCall] call to method Sink +# 44| 0: [FieldAccess] access to field Item1 +# 44| -1: [LocalVariableAccess] access to local variable tup +# 45| 1: [SwitchCaseExpr] ... => ... +# 45| 0: [RecursivePatternExpr] { ... } +# 45| 2: [PositionalPatternExpr] ( ... ) +# 45| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 45| 1: [ConstantPatternExpr,IntLiteral] 2 +# 45| 2: [MethodCall] call to method Sink +# 45| 0: [FieldAccess] access to field Item1 +# 45| -1: [LocalVariableAccess] access to local variable tup +# 46| 2: [SwitchCaseExpr] ... => ... +# 46| 0: [RecursivePatternExpr] { ... } +# 46| 0: [VariablePatternExpr] (String,Int32) t1 +# 46| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 46| 0: [TypeMention] (string, int) +# 46| 1: [TypeMention] string +# 46| 2: [TypeMention] int +# 46| 2: [PositionalPatternExpr] ( ... ) +# 46| 0: [ConstantPatternExpr,StringLiteral] "taint source" +# 46| 1: [ConstantPatternExpr,IntLiteral] 3 +# 46| 3: [PropertyPatternExpr] { ... } +# 46| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 46| 2: [MethodCall] call to method Sink +# 46| 0: [FieldAccess] access to field Item1 +# 46| -1: [LocalVariableAccess] access to local variable tup +# 47| 3: [SwitchCaseExpr] ... => ... +# 47| 0: [RecursivePatternExpr] { ... } +# 47| 0: [VariablePatternExpr] (String,Int32) t1 +# 47| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 47| 0: [TypeMention] (string, int) +# 47| 1: [TypeMention] string +# 47| 2: [TypeMention] int +# 47| 2: [PositionalPatternExpr] ( ... ) +# 47| 0: [ConstantPatternExpr,StringLiteral] "not taint source" +# 47| 1: [ConstantPatternExpr,IntLiteral] 3 +# 47| 3: [PropertyPatternExpr] { ... } +# 47| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 47| 2: [MethodCall] call to method Sink +# 47| 0: [FieldAccess] access to field Item1 +# 47| -1: [LocalVariableAccess] access to local variable tup +# 48| 4: [SwitchCaseExpr] ... => ... +# 48| 0: [RecursivePatternExpr] { ... } +# 48| 0: [VariablePatternExpr] (String,Int32) t1 +# 48| 1: [TypeAccessPatternExpr] access to type (String,Int32) +# 48| 0: [TypeMention] (string, int) +# 48| 1: [TypeMention] string +# 48| 2: [TypeMention] int +# 48| 2: [PositionalPatternExpr] ( ... ) +# 48| 0: [VariablePatternExpr] String i +# 48| 1: [ConstantPatternExpr,IntLiteral] 3 +# 48| 3: [PropertyPatternExpr] { ... } +# 48| 0: [ConstantPatternExpr,IntLiteral,LabeledPatternExpr] 3 +# 48| 2: [MethodCall] call to method Sink +# 48| 0: [LocalVariableAccess] access to local variable i +# 49| 5: [SwitchCaseExpr] ... => ... +# 49| 0: [RecursivePatternExpr] { ... } +# 49| 2: [PositionalPatternExpr] ( ... ) +# 49| 0: [VariablePatternExpr] String i +# 49| 1: [ConstantPatternExpr,IntLiteral] 5 +# 49| 2: [MethodCall] call to method Sink +# 49| 0: [LocalVariableAccess] access to local variable i +# 53| 6: [Method] Sink +# 53| -1: [TypeMention] string +#-----| 2: (Parameters) +# 53| 0: [Parameter] o +# 53| -1: [TypeMention] object +# 53| 4: [ThrowExpr] throw ... +# 53| 0: [NullLiteral] null +# 56| [Class] Base +#-----| 3: (Base types) +# 56| 1: [TypeMention] ITuple +# 58| 5: [Property] Length +# 58| -1: [TypeMention] int +# 58| 3: [Getter] get_Length +# 58| 4: [ThrowExpr] throw ... +# 58| 0: [NullLiteral] null +# 59| 6: [Indexer] Item +# 59| -1: [TypeMention] object +#-----| 1: (Parameters) +# 59| 0: [Parameter] c +# 59| -1: [TypeMention] int +# 59| 3: [Getter] get_Item +#-----| 2: (Parameters) +# 59| 0: [Parameter] c +# 59| 4: [ThrowExpr] throw ... +# 59| 0: [NullLiteral] null +# 62| [Class] Item +#-----| 3: (Base types) +# 62| 0: [TypeMention] Base +# 64| 5: [Property] X +# 64| -1: [TypeMention] string +# 64| 3: [Getter] get_X +# 64| 4: [Setter] set_X +#-----| 2: (Parameters) +# 64| 0: [Parameter] value +# 65| 6: [Property] Y +# 65| -1: [TypeMention] int +# 65| 3: [Getter] get_Y +# 65| 4: [Setter] set_Y +#-----| 2: (Parameters) +# 65| 0: [Parameter] value +# 67| 7: [Method] Deconstruct +# 67| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 67| 0: [Parameter] x +# 67| -1: [TypeMention] string +# 67| 1: [Parameter] y +# 67| -1: [TypeMention] int +# 68| 4: [BlockStmt] {...} +# 69| 0: [ExprStmt] ...; +# 69| 0: [AssignExpr] ... = ... +# 69| 0: [ParameterAccess] access to parameter x +# 69| 1: [PropertyCall] access to property X +# 70| 1: [ExprStmt] ...; +# 70| 0: [AssignExpr] ... = ... +# 70| 0: [ParameterAccess] access to parameter y +# 70| 1: [PropertyCall] access to property Y Tuples.cs: # 3| [Class] Tuples # 5| 5: [Method] M1 diff --git a/csharp/ql/test/library-tests/dataflow/tuples/Tuples.expected b/csharp/ql/test/library-tests/dataflow/tuples/Tuples.expected index 339c859a6cea..f17baeab0058 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/Tuples.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/Tuples.expected @@ -1,4 +1,38 @@ edges +| MixedPatterns.cs:6:29:6:50 | { ..., ... } [X] : String | MixedPatterns.cs:9:13:9:47 | SSA def(z) [X] : String | +| MixedPatterns.cs:6:29:6:50 | { ..., ... } [X] : String | MixedPatterns.cs:10:13:10:51 | SSA def(z) [X] : String | +| MixedPatterns.cs:6:35:6:48 | "taint source" : String | MixedPatterns.cs:6:29:6:50 | { ..., ... } [X] : String | +| MixedPatterns.cs:9:13:9:47 | SSA def(z) [X] : String | MixedPatterns.cs:9:57:9:57 | access to local variable z [X] : String | +| MixedPatterns.cs:9:57:9:57 | access to local variable z [X] : String | MixedPatterns.cs:9:57:9:59 | access to property X | +| MixedPatterns.cs:10:13:10:51 | SSA def(z) [X] : String | MixedPatterns.cs:10:61:10:61 | access to local variable z [X] : String | +| MixedPatterns.cs:10:61:10:61 | access to local variable z [X] : String | MixedPatterns.cs:10:61:10:63 | access to property X | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | MixedPatterns.cs:19:41:19:41 | access to local variable b [X] : String | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | MixedPatterns.cs:20:45:20:45 | access to local variable b [X] : String | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | MixedPatterns.cs:21:13:21:33 | SSA def(p) [X] : String | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | MixedPatterns.cs:22:13:22:37 | SSA def(p) [X] : String | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | +| MixedPatterns.cs:19:41:19:41 | access to local variable b [X] : String | MixedPatterns.cs:19:41:19:43 | access to property X | +| MixedPatterns.cs:20:45:20:45 | access to local variable b [X] : String | MixedPatterns.cs:20:45:20:47 | access to property X | +| MixedPatterns.cs:21:13:21:33 | SSA def(p) [X] : String | MixedPatterns.cs:21:43:21:43 | access to local variable p [X] : String | +| MixedPatterns.cs:21:43:21:43 | access to local variable p [X] : String | MixedPatterns.cs:21:43:21:45 | access to property X | +| MixedPatterns.cs:22:13:22:37 | SSA def(p) [X] : String | MixedPatterns.cs:22:47:22:47 | access to local variable p [X] : String | +| MixedPatterns.cs:22:47:22:47 | access to local variable p [X] : String | MixedPatterns.cs:22:47:22:49 | access to property X | +| MixedPatterns.cs:27:31:27:52 | { ..., ... } [X] : String | MixedPatterns.cs:30:13:30:47 | SSA def(z) [X] : String | +| MixedPatterns.cs:27:31:27:52 | { ..., ... } [X] : String | MixedPatterns.cs:31:13:31:51 | SSA def(z) [X] : String | +| MixedPatterns.cs:27:37:27:50 | "taint source" : String | MixedPatterns.cs:27:31:27:52 | { ..., ... } [X] : String | +| MixedPatterns.cs:30:13:30:47 | SSA def(z) [X] : String | MixedPatterns.cs:30:57:30:57 | access to local variable z [X] : String | +| MixedPatterns.cs:30:57:30:57 | access to local variable z [X] : String | MixedPatterns.cs:30:57:30:59 | access to property X | +| MixedPatterns.cs:31:13:31:51 | SSA def(z) [X] : String | MixedPatterns.cs:31:61:31:61 | access to local variable z [X] : String | +| MixedPatterns.cs:31:61:31:61 | access to local variable z [X] : String | MixedPatterns.cs:31:61:31:63 | access to property X | +| MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | MixedPatterns.cs:44:41:44:43 | access to local variable tup [Item1] : String | +| MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | MixedPatterns.cs:45:45:45:47 | access to local variable tup [Item1] : String | +| MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | MixedPatterns.cs:46:80:46:82 | access to local variable tup [Item1] : String | +| MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | MixedPatterns.cs:47:84:47:86 | access to local variable tup [Item1] : String | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | +| MixedPatterns.cs:44:41:44:43 | access to local variable tup [Item1] : String | MixedPatterns.cs:44:41:44:49 | access to field Item1 | +| MixedPatterns.cs:45:45:45:47 | access to local variable tup [Item1] : String | MixedPatterns.cs:45:45:45:53 | access to field Item1 | +| MixedPatterns.cs:46:80:46:82 | access to local variable tup [Item1] : String | MixedPatterns.cs:46:80:46:88 | access to field Item1 | +| MixedPatterns.cs:47:84:47:86 | access to local variable tup [Item1] : String | MixedPatterns.cs:47:84:47:92 | access to field Item1 | | Tuples.cs:7:17:7:56 | (..., ...) [Item1] : String | Tuples.cs:8:9:8:23 | (..., ...) [Item1] : String | | Tuples.cs:7:17:7:56 | (..., ...) [Item1] : String | Tuples.cs:13:9:13:19 | (..., ...) [Item1] : String | | Tuples.cs:7:17:7:56 | (..., ...) [Item1] : String | Tuples.cs:18:9:18:22 | (..., ...) [Item1] : String | @@ -68,6 +102,44 @@ edges | Tuples.cs:89:24:89:37 | "taint source" : String | Tuples.cs:89:17:89:41 | object creation of type R1 [i] : String | | Tuples.cs:90:14:90:14 | access to local variable r [i] : String | Tuples.cs:90:14:90:16 | access to property i | nodes +| MixedPatterns.cs:6:29:6:50 | { ..., ... } [X] : String | semmle.label | { ..., ... } [X] : String | +| MixedPatterns.cs:6:35:6:48 | "taint source" : String | semmle.label | "taint source" : String | +| MixedPatterns.cs:9:13:9:47 | SSA def(z) [X] : String | semmle.label | SSA def(z) [X] : String | +| MixedPatterns.cs:9:57:9:57 | access to local variable z [X] : String | semmle.label | access to local variable z [X] : String | +| MixedPatterns.cs:9:57:9:59 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:10:13:10:51 | SSA def(z) [X] : String | semmle.label | SSA def(z) [X] : String | +| MixedPatterns.cs:10:61:10:61 | access to local variable z [X] : String | semmle.label | access to local variable z [X] : String | +| MixedPatterns.cs:10:61:10:63 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:16:29:16:50 | { ..., ... } [X] : String | semmle.label | { ..., ... } [X] : String | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | semmle.label | "taint source" : String | +| MixedPatterns.cs:19:41:19:41 | access to local variable b [X] : String | semmle.label | access to local variable b [X] : String | +| MixedPatterns.cs:19:41:19:43 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:20:45:20:45 | access to local variable b [X] : String | semmle.label | access to local variable b [X] : String | +| MixedPatterns.cs:20:45:20:47 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:21:13:21:33 | SSA def(p) [X] : String | semmle.label | SSA def(p) [X] : String | +| MixedPatterns.cs:21:43:21:43 | access to local variable p [X] : String | semmle.label | access to local variable p [X] : String | +| MixedPatterns.cs:21:43:21:45 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:22:13:22:37 | SSA def(p) [X] : String | semmle.label | SSA def(p) [X] : String | +| MixedPatterns.cs:22:47:22:47 | access to local variable p [X] : String | semmle.label | access to local variable p [X] : String | +| MixedPatterns.cs:22:47:22:49 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:27:31:27:52 | { ..., ... } [X] : String | semmle.label | { ..., ... } [X] : String | +| MixedPatterns.cs:27:37:27:50 | "taint source" : String | semmle.label | "taint source" : String | +| MixedPatterns.cs:30:13:30:47 | SSA def(z) [X] : String | semmle.label | SSA def(z) [X] : String | +| MixedPatterns.cs:30:57:30:57 | access to local variable z [X] : String | semmle.label | access to local variable z [X] : String | +| MixedPatterns.cs:30:57:30:59 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:31:13:31:51 | SSA def(z) [X] : String | semmle.label | SSA def(z) [X] : String | +| MixedPatterns.cs:31:61:31:61 | access to local variable z [X] : String | semmle.label | access to local variable z [X] : String | +| MixedPatterns.cs:31:61:31:63 | access to property X | semmle.label | access to property X | +| MixedPatterns.cs:41:19:41:37 | (..., ...) [Item1] : String | semmle.label | (..., ...) [Item1] : String | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | semmle.label | "taint source" : String | +| MixedPatterns.cs:44:41:44:43 | access to local variable tup [Item1] : String | semmle.label | access to local variable tup [Item1] : String | +| MixedPatterns.cs:44:41:44:49 | access to field Item1 | semmle.label | access to field Item1 | +| MixedPatterns.cs:45:45:45:47 | access to local variable tup [Item1] : String | semmle.label | access to local variable tup [Item1] : String | +| MixedPatterns.cs:45:45:45:53 | access to field Item1 | semmle.label | access to field Item1 | +| MixedPatterns.cs:46:80:46:82 | access to local variable tup [Item1] : String | semmle.label | access to local variable tup [Item1] : String | +| MixedPatterns.cs:46:80:46:88 | access to field Item1 | semmle.label | access to field Item1 | +| MixedPatterns.cs:47:84:47:86 | access to local variable tup [Item1] : String | semmle.label | access to local variable tup [Item1] : String | +| MixedPatterns.cs:47:84:47:92 | access to field Item1 | semmle.label | access to field Item1 | | Tuples.cs:7:17:7:56 | (..., ...) [Item1] : String | semmle.label | (..., ...) [Item1] : String | | Tuples.cs:7:17:7:56 | (..., ...) [Item2, Item2] : String | semmle.label | (..., ...) [Item2, Item2] : String | | Tuples.cs:7:21:7:34 | "taint source" : String | semmle.label | "taint source" : String | @@ -145,6 +217,18 @@ nodes | Tuples.cs:90:14:90:14 | access to local variable r [i] : String | semmle.label | access to local variable r [i] : String | | Tuples.cs:90:14:90:16 | access to property i | semmle.label | access to property i | #select +| MixedPatterns.cs:6:35:6:48 | "taint source" : String | MixedPatterns.cs:6:35:6:48 | "taint source" : String | MixedPatterns.cs:9:57:9:59 | access to property X | $@ | MixedPatterns.cs:9:57:9:59 | access to property X | access to property X | +| MixedPatterns.cs:6:35:6:48 | "taint source" : String | MixedPatterns.cs:6:35:6:48 | "taint source" : String | MixedPatterns.cs:10:61:10:63 | access to property X | $@ | MixedPatterns.cs:10:61:10:63 | access to property X | access to property X | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:19:41:19:43 | access to property X | $@ | MixedPatterns.cs:19:41:19:43 | access to property X | access to property X | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:20:45:20:47 | access to property X | $@ | MixedPatterns.cs:20:45:20:47 | access to property X | access to property X | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:21:43:21:45 | access to property X | $@ | MixedPatterns.cs:21:43:21:45 | access to property X | access to property X | +| MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:16:35:16:48 | "taint source" : String | MixedPatterns.cs:22:47:22:49 | access to property X | $@ | MixedPatterns.cs:22:47:22:49 | access to property X | access to property X | +| MixedPatterns.cs:27:37:27:50 | "taint source" : String | MixedPatterns.cs:27:37:27:50 | "taint source" : String | MixedPatterns.cs:30:57:30:59 | access to property X | $@ | MixedPatterns.cs:30:57:30:59 | access to property X | access to property X | +| MixedPatterns.cs:27:37:27:50 | "taint source" : String | MixedPatterns.cs:27:37:27:50 | "taint source" : String | MixedPatterns.cs:31:61:31:63 | access to property X | $@ | MixedPatterns.cs:31:61:31:63 | access to property X | access to property X | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:44:41:44:49 | access to field Item1 | $@ | MixedPatterns.cs:44:41:44:49 | access to field Item1 | access to field Item1 | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:45:45:45:53 | access to field Item1 | $@ | MixedPatterns.cs:45:45:45:53 | access to field Item1 | access to field Item1 | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:46:80:46:88 | access to field Item1 | $@ | MixedPatterns.cs:46:80:46:88 | access to field Item1 | access to field Item1 | +| MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:41:20:41:33 | "taint source" : String | MixedPatterns.cs:47:84:47:92 | access to field Item1 | $@ | MixedPatterns.cs:47:84:47:92 | access to field Item1 | access to field Item1 | | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:9:14:9:14 | access to local variable a | $@ | Tuples.cs:9:14:9:14 | access to local variable a | access to local variable a | | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:14:14:14:14 | access to local variable a | $@ | Tuples.cs:14:14:14:14 | access to local variable a | access to local variable a | | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:7:21:7:34 | "taint source" : String | Tuples.cs:19:14:19:14 | access to local variable p | $@ | Tuples.cs:19:14:19:14 | access to local variable p | access to local variable p |