Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a6cd4a

Browse files
author
Dave Bartolomeo
committed
Fix test expectations for new nodes and edges in path queries
1 parent 3fce971 commit 5a6cd4a

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
11
edges
2+
| search.c:14:24:14:28 | *query | search.c:17:8:17:12 | (const char *)... |
3+
| search.c:14:24:14:28 | *query | search.c:17:8:17:12 | query |
24
| search.c:14:24:14:28 | query | search.c:17:8:17:12 | (const char *)... |
35
| search.c:14:24:14:28 | query | search.c:17:8:17:12 | query |
46
| search.c:14:24:14:28 | query | search.c:17:8:17:12 | query |
7+
| search.c:22:24:22:28 | *query | search.c:23:39:23:43 | query |
8+
| search.c:22:24:22:28 | *query | search.c:23:39:23:43 | query |
59
| search.c:22:24:22:28 | query | search.c:23:39:23:43 | query |
610
| search.c:22:24:22:28 | query | search.c:23:39:23:43 | query |
11+
| search.c:41:21:41:26 | call to getenv | search.c:14:24:14:28 | *query |
12+
| search.c:41:21:41:26 | call to getenv | search.c:14:24:14:28 | *query |
713
| search.c:41:21:41:26 | call to getenv | search.c:14:24:14:28 | query |
814
| search.c:41:21:41:26 | call to getenv | search.c:14:24:14:28 | query |
15+
| search.c:41:21:41:26 | call to getenv | search.c:22:24:22:28 | *query |
16+
| search.c:41:21:41:26 | call to getenv | search.c:22:24:22:28 | *query |
917
| search.c:41:21:41:26 | call to getenv | search.c:22:24:22:28 | query |
1018
| search.c:41:21:41:26 | call to getenv | search.c:22:24:22:28 | query |
1119
nodes
20+
| search.c:14:24:14:28 | *query | semmle.label | *query |
1221
| search.c:14:24:14:28 | query | semmle.label | query |
1322
| search.c:17:8:17:12 | (const char *)... | semmle.label | (const char *)... |
1423
| search.c:17:8:17:12 | (const char *)... | semmle.label | (const char *)... |
1524
| search.c:17:8:17:12 | query | semmle.label | query |
1625
| search.c:17:8:17:12 | query | semmle.label | query |
1726
| search.c:17:8:17:12 | query | semmle.label | query |
27+
| search.c:22:24:22:28 | *query | semmle.label | *query |
1828
| search.c:22:24:22:28 | query | semmle.label | query |
1929
| search.c:23:39:23:43 | query | semmle.label | query |
2030
| search.c:23:39:23:43 | query | semmle.label | query |
2131
| search.c:23:39:23:43 | query | semmle.label | query |
2232
| search.c:41:21:41:26 | call to getenv | semmle.label | call to getenv |
2333
| search.c:41:21:41:26 | call to getenv | semmle.label | call to getenv |
2434
| search.c:45:5:45:15 | Argument 0 | semmle.label | Argument 0 |
35+
| search.c:45:17:45:25 | Argument 0 indirection | semmle.label | Argument 0 indirection |
2536
| search.c:47:5:47:15 | Argument 0 | semmle.label | Argument 0 |
37+
| search.c:47:17:47:25 | Argument 0 indirection | semmle.label | Argument 0 indirection |
2638
#select
2739
| search.c:17:8:17:12 | query | search.c:41:21:41:26 | call to getenv | search.c:17:8:17:12 | query | Cross-site scripting vulnerability due to $@. | search.c:41:21:41:26 | call to getenv | this query data |
2840
| search.c:23:39:23:43 | query | search.c:41:21:41:26 | call to getenv | search.c:23:39:23:43 | query | Cross-site scripting vulnerability due to $@. | search.c:41:21:41:26 | call to getenv | this query data |

cpp/ql/test/query-tests/Security/CWE/CWE-114/semmle/UncontrolledProcessOperation/UncontrolledProcessOperation.expected

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
edges
2+
| test.cpp:24:30:24:36 | *command | test.cpp:26:10:26:16 | command |
3+
| test.cpp:24:30:24:36 | *command | test.cpp:26:10:26:16 | command |
24
| test.cpp:24:30:24:36 | command | test.cpp:26:10:26:16 | command |
35
| test.cpp:24:30:24:36 | command | test.cpp:26:10:26:16 | command |
6+
| test.cpp:29:30:29:36 | *command | test.cpp:31:10:31:16 | command |
7+
| test.cpp:29:30:29:36 | *command | test.cpp:31:10:31:16 | command |
48
| test.cpp:29:30:29:36 | command | test.cpp:31:10:31:16 | command |
59
| test.cpp:29:30:29:36 | command | test.cpp:31:10:31:16 | command |
10+
| test.cpp:42:18:42:23 | call to getenv | test.cpp:24:30:24:36 | *command |
611
| test.cpp:42:18:42:23 | call to getenv | test.cpp:24:30:24:36 | command |
12+
| test.cpp:42:18:42:34 | (const char *)... | test.cpp:24:30:24:36 | *command |
713
| test.cpp:42:18:42:34 | (const char *)... | test.cpp:24:30:24:36 | command |
14+
| test.cpp:43:18:43:23 | call to getenv | test.cpp:29:30:29:36 | *command |
815
| test.cpp:43:18:43:23 | call to getenv | test.cpp:29:30:29:36 | command |
16+
| test.cpp:43:18:43:34 | (const char *)... | test.cpp:29:30:29:36 | *command |
917
| test.cpp:43:18:43:34 | (const char *)... | test.cpp:29:30:29:36 | command |
1018
| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | (const char *)... |
1119
| test.cpp:56:12:56:17 | buffer | test.cpp:62:10:62:15 | buffer |
@@ -24,20 +32,24 @@ edges
2432
| test.cpp:76:12:76:17 | fgets output argument | test.cpp:79:10:79:13 | (const char *)... |
2533
| test.cpp:76:12:76:17 | fgets output argument | test.cpp:79:10:79:13 | data |
2634
nodes
35+
| test.cpp:24:30:24:36 | *command | semmle.label | *command |
2736
| test.cpp:24:30:24:36 | command | semmle.label | command |
2837
| test.cpp:26:10:26:16 | command | semmle.label | command |
2938
| test.cpp:26:10:26:16 | command | semmle.label | command |
3039
| test.cpp:26:10:26:16 | command | semmle.label | command |
40+
| test.cpp:29:30:29:36 | *command | semmle.label | *command |
3141
| test.cpp:29:30:29:36 | command | semmle.label | command |
3242
| test.cpp:31:10:31:16 | command | semmle.label | command |
3343
| test.cpp:31:10:31:16 | command | semmle.label | command |
3444
| test.cpp:31:10:31:16 | command | semmle.label | command |
3545
| test.cpp:42:7:42:16 | Argument 0 | semmle.label | Argument 0 |
3646
| test.cpp:42:18:42:23 | call to getenv | semmle.label | call to getenv |
3747
| test.cpp:42:18:42:34 | (const char *)... | semmle.label | (const char *)... |
48+
| test.cpp:42:18:42:34 | Argument 0 indirection | semmle.label | Argument 0 indirection |
3849
| test.cpp:43:7:43:16 | Argument 0 | semmle.label | Argument 0 |
3950
| test.cpp:43:18:43:23 | call to getenv | semmle.label | call to getenv |
4051
| test.cpp:43:18:43:34 | (const char *)... | semmle.label | (const char *)... |
52+
| test.cpp:43:18:43:34 | Argument 0 indirection | semmle.label | Argument 0 indirection |
4153
| test.cpp:56:12:56:17 | buffer | semmle.label | buffer |
4254
| test.cpp:56:12:56:17 | fgets output argument | semmle.label | fgets output argument |
4355
| test.cpp:62:10:62:15 | (const char *)... | semmle.label | (const char *)... |

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/globalVars/UncontrolledFormatStringThroughGlobalVar.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ edges
1919
| globalVars.c:12:2:12:15 | Store | globalVars.c:8:7:8:10 | copy |
2020
| globalVars.c:15:21:15:23 | val | globalVars.c:16:2:16:12 | Store |
2121
| globalVars.c:16:2:16:12 | Store | globalVars.c:9:7:9:11 | copy2 |
22+
| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | *argv |
23+
| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | *argv |
2224
| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | argv |
2325
| globalVars.c:24:11:24:14 | argv | globalVars.c:11:22:11:25 | argv |
2426
| globalVars.c:27:9:27:12 | copy | globalVars.c:27:9:27:12 | (const char *)... |
@@ -37,6 +39,7 @@ nodes
3739
| globalVars.c:15:21:15:23 | val | semmle.label | val |
3840
| globalVars.c:16:2:16:12 | Store | semmle.label | Store |
3941
| globalVars.c:24:2:24:9 | Argument 0 | semmle.label | Argument 0 |
42+
| globalVars.c:24:11:24:14 | Argument 0 indirection | semmle.label | Argument 0 indirection |
4043
| globalVars.c:24:11:24:14 | argv | semmle.label | argv |
4144
| globalVars.c:24:11:24:14 | argv | semmle.label | argv |
4245
| globalVars.c:27:9:27:12 | (const char *)... | semmle.label | (const char *)... |

0 commit comments

Comments
 (0)