Skip to content

Commit 753fa8e

Browse files
committed
Go: Update expected test output
1 parent e3a4dfa commit 753fa8e

File tree

3 files changed

+133
-0
lines changed

3 files changed

+133
-0
lines changed

go/ql/test/library-tests/semmle/go/frameworks/Twirp/RequestForgery.expected

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,60 @@
11
#select
2+
| server/main.go:30:38:30:48 | selection of Text | rpc/notes/service.twirp.go:455:23:455:30 | selection of Body | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | rpc/notes/service.twirp.go:455:23:455:30 | selection of Body | user-provided value |
23
| server/main.go:30:38:30:48 | selection of Text | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | user-provided value |
4+
| server/main.go:30:38:30:48 | selection of Text | rpc/notes/service.twirp.go:635:23:635:30 | selection of Body | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | rpc/notes/service.twirp.go:635:23:635:30 | selection of Body | user-provided value |
5+
| server/main.go:30:38:30:48 | selection of Text | rpc/notes/service.twirp.go:718:25:718:32 | selection of Body | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | rpc/notes/service.twirp.go:718:25:718:32 | selection of Body | user-provided value |
36
| server/main.go:30:38:30:48 | selection of Text | server/main.go:19:56:19:61 | definition of params | server/main.go:30:38:30:48 | selection of Text | The $@ of this request depends on a $@. | server/main.go:30:38:30:48 | selection of Text | URL | server/main.go:19:56:19:61 | definition of params | user-provided value |
47
edges
58
| client/main.go:16:35:16:78 | &... | server/main.go:19:56:19:61 | definition of params | provenance | |
9+
| rpc/notes/service.twirp.go:382:66:382:68 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:416:32:416:34 | req [pointer, Body] | provenance | |
10+
| rpc/notes/service.twirp.go:416:32:416:34 | req [pointer, Body] | rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | provenance | |
11+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:382:66:382:68 | definition of req [pointer, Body] | provenance | |
12+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:428:93:428:95 | definition of req [Reverse] [pointer, Body] | provenance | |
13+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | provenance | |
14+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | provenance | |
15+
| rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | rpc/notes/service.twirp.go:529:101:529:103 | definition of req [pointer, Body] | provenance | |
16+
| rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | rpc/notes/service.twirp.go:529:101:529:103 | definition of req [pointer, Body] | provenance | |
17+
| rpc/notes/service.twirp.go:446:97:446:99 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | provenance | |
18+
| rpc/notes/service.twirp.go:455:23:455:25 | implicit dereference [Reverse] [Body] | rpc/notes/service.twirp.go:455:23:455:25 | req [Reverse] [pointer, Body] | provenance | |
19+
| rpc/notes/service.twirp.go:455:23:455:25 | req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:446:97:446:99 | definition of req [Reverse] [pointer, Body] | provenance | |
20+
| rpc/notes/service.twirp.go:455:23:455:30 | selection of Body | rpc/notes/service.twirp.go:455:23:455:30 | selection of Body [Reverse] | provenance | Src:MaD:1 |
21+
| rpc/notes/service.twirp.go:455:23:455:30 | selection of Body [Reverse] | rpc/notes/service.twirp.go:455:23:455:25 | implicit dereference [Reverse] [Body] | provenance | |
622
| rpc/notes/service.twirp.go:473:6:473:13 | definition of typedReq | rpc/notes/service.twirp.go:477:44:477:51 | typedReq | provenance | |
723
| rpc/notes/service.twirp.go:477:44:477:51 | typedReq | server/main.go:19:56:19:61 | definition of params | provenance | |
824
| rpc/notes/service.twirp.go:493:2:493:2 | capture variable reqContent | rpc/notes/service.twirp.go:495:35:495:44 | reqContent | provenance | |
925
| rpc/notes/service.twirp.go:495:35:495:44 | reqContent | server/main.go:19:56:19:61 | definition of params | provenance | |
26+
| rpc/notes/service.twirp.go:529:101:529:103 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | provenance | |
27+
| rpc/notes/service.twirp.go:529:101:529:103 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:538:25:538:27 | req [pointer, Body] | provenance | |
1028
| rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | rpc/notes/service.twirp.go:544:27:544:29 | buf | provenance | |
29+
| rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | rpc/notes/service.twirp.go:544:27:544:29 | buf | provenance | |
30+
| rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Body] | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | provenance | |
31+
| rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Reverse] [Body] | rpc/notes/service.twirp.go:538:25:538:27 | req [Reverse] [pointer, Body] | provenance | |
32+
| rpc/notes/service.twirp.go:538:25:538:27 | req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:529:101:529:103 | definition of req [Reverse] [pointer, Body] | provenance | |
33+
| rpc/notes/service.twirp.go:538:25:538:27 | req [pointer, Body] | rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Body] | provenance | |
34+
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | provenance | MaD:3 |
1135
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | provenance | Src:MaD:1 MaD:3 |
36+
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | rpc/notes/service.twirp.go:538:25:538:32 | selection of Body [Reverse] | provenance | Src:MaD:1 |
37+
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body [Reverse] | rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Reverse] [Body] | provenance | |
38+
| rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | provenance | |
1239
| rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | provenance | |
1340
| rpc/notes/service.twirp.go:544:27:544:29 | buf | rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | provenance | MaD:2 |
41+
| rpc/notes/service.twirp.go:544:27:544:29 | buf | rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | provenance | MaD:2 |
1442
| rpc/notes/service.twirp.go:554:6:554:13 | definition of typedReq | rpc/notes/service.twirp.go:558:44:558:51 | typedReq | provenance | |
1543
| rpc/notes/service.twirp.go:558:44:558:51 | typedReq | server/main.go:19:56:19:61 | definition of params | provenance | |
1644
| rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | rpc/notes/service.twirp.go:576:35:576:44 | reqContent | provenance | |
1745
| rpc/notes/service.twirp.go:576:35:576:44 | reqContent | server/main.go:19:56:19:61 | definition of params | provenance | |
46+
| rpc/notes/service.twirp.go:608:94:608:96 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:382:66:382:68 | definition of req [pointer, Body] | provenance | |
47+
| rpc/notes/service.twirp.go:608:94:608:96 | definition of req [pointer, Body] | rpc/notes/service.twirp.go:608:94:608:96 | definition of req [Reverse] [pointer, Body] | provenance | |
48+
| rpc/notes/service.twirp.go:626:98:626:100 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:608:94:608:96 | definition of req [pointer, Body] | provenance | |
49+
| rpc/notes/service.twirp.go:635:23:635:25 | implicit dereference [Reverse] [Body] | rpc/notes/service.twirp.go:635:23:635:25 | req [Reverse] [pointer, Body] | provenance | |
50+
| rpc/notes/service.twirp.go:635:23:635:25 | req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:626:98:626:100 | definition of req [Reverse] [pointer, Body] | provenance | |
51+
| rpc/notes/service.twirp.go:635:23:635:30 | selection of Body | rpc/notes/service.twirp.go:635:23:635:30 | selection of Body [Reverse] | provenance | Src:MaD:1 |
52+
| rpc/notes/service.twirp.go:635:23:635:30 | selection of Body [Reverse] | rpc/notes/service.twirp.go:635:23:635:25 | implicit dereference [Reverse] [Body] | provenance | |
53+
| rpc/notes/service.twirp.go:709:102:709:104 | definition of req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:608:94:608:96 | definition of req [pointer, Body] | provenance | |
54+
| rpc/notes/service.twirp.go:718:25:718:27 | implicit dereference [Reverse] [Body] | rpc/notes/service.twirp.go:718:25:718:27 | req [Reverse] [pointer, Body] | provenance | |
55+
| rpc/notes/service.twirp.go:718:25:718:27 | req [Reverse] [pointer, Body] | rpc/notes/service.twirp.go:709:102:709:104 | definition of req [Reverse] [pointer, Body] | provenance | |
56+
| rpc/notes/service.twirp.go:718:25:718:32 | selection of Body | rpc/notes/service.twirp.go:718:25:718:32 | selection of Body [Reverse] | provenance | Src:MaD:1 |
57+
| rpc/notes/service.twirp.go:718:25:718:32 | selection of Body [Reverse] | rpc/notes/service.twirp.go:718:25:718:27 | implicit dereference [Reverse] [Body] | provenance | |
1858
| server/main.go:19:56:19:61 | definition of params | server/main.go:19:56:19:61 | definition of params [Reverse] | provenance | |
1959
| server/main.go:19:56:19:61 | definition of params | server/main.go:30:38:30:48 | selection of Text | provenance | |
2060
| server/main.go:19:56:19:61 | definition of params | server/main.go:30:38:30:48 | selection of Text | provenance | |
@@ -29,18 +69,53 @@ models
2969
| 3 | Summary: io; ; false; ReadAll; ; ; Argument[0]; ReturnValue[0]; taint; manual |
3070
nodes
3171
| client/main.go:16:35:16:78 | &... | semmle.label | &... |
72+
| rpc/notes/service.twirp.go:382:66:382:68 | definition of req [pointer, Body] | semmle.label | definition of req [pointer, Body] |
73+
| rpc/notes/service.twirp.go:416:32:416:34 | req [pointer, Body] | semmle.label | req [pointer, Body] |
74+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
75+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | semmle.label | definition of req [pointer, Body] |
76+
| rpc/notes/service.twirp.go:428:93:428:95 | definition of req [pointer, Body] | semmle.label | definition of req [pointer, Body] |
77+
| rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | semmle.label | req [pointer, Body] |
78+
| rpc/notes/service.twirp.go:438:40:438:42 | req [pointer, Body] | semmle.label | req [pointer, Body] |
79+
| rpc/notes/service.twirp.go:446:97:446:99 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
80+
| rpc/notes/service.twirp.go:455:23:455:25 | implicit dereference [Reverse] [Body] | semmle.label | implicit dereference [Reverse] [Body] |
81+
| rpc/notes/service.twirp.go:455:23:455:25 | req [Reverse] [pointer, Body] | semmle.label | req [Reverse] [pointer, Body] |
82+
| rpc/notes/service.twirp.go:455:23:455:30 | selection of Body | semmle.label | selection of Body |
83+
| rpc/notes/service.twirp.go:455:23:455:30 | selection of Body [Reverse] | semmle.label | selection of Body [Reverse] |
3284
| rpc/notes/service.twirp.go:473:6:473:13 | definition of typedReq | semmle.label | definition of typedReq |
3385
| rpc/notes/service.twirp.go:477:44:477:51 | typedReq | semmle.label | typedReq |
3486
| rpc/notes/service.twirp.go:493:2:493:2 | capture variable reqContent | semmle.label | capture variable reqContent |
3587
| rpc/notes/service.twirp.go:495:35:495:44 | reqContent | semmle.label | reqContent |
88+
| rpc/notes/service.twirp.go:529:101:529:103 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
89+
| rpc/notes/service.twirp.go:529:101:529:103 | definition of req [pointer, Body] | semmle.label | definition of req [pointer, Body] |
90+
| rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | semmle.label | ... := ...[0] |
3691
| rpc/notes/service.twirp.go:538:2:538:33 | ... := ...[0] | semmle.label | ... := ...[0] |
92+
| rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Body] | semmle.label | implicit dereference [Body] |
93+
| rpc/notes/service.twirp.go:538:25:538:27 | implicit dereference [Reverse] [Body] | semmle.label | implicit dereference [Reverse] [Body] |
94+
| rpc/notes/service.twirp.go:538:25:538:27 | req [Reverse] [pointer, Body] | semmle.label | req [Reverse] [pointer, Body] |
95+
| rpc/notes/service.twirp.go:538:25:538:27 | req [pointer, Body] | semmle.label | req [pointer, Body] |
3796
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | semmle.label | selection of Body |
97+
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body | semmle.label | selection of Body |
98+
| rpc/notes/service.twirp.go:538:25:538:32 | selection of Body [Reverse] | semmle.label | selection of Body [Reverse] |
99+
| rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | semmle.label | definition of reqContent |
38100
| rpc/notes/service.twirp.go:543:2:543:11 | definition of reqContent | semmle.label | definition of reqContent |
39101
| rpc/notes/service.twirp.go:544:27:544:29 | buf | semmle.label | buf |
102+
| rpc/notes/service.twirp.go:544:27:544:29 | buf | semmle.label | buf |
40103
| rpc/notes/service.twirp.go:554:6:554:13 | definition of typedReq | semmle.label | definition of typedReq |
41104
| rpc/notes/service.twirp.go:558:44:558:51 | typedReq | semmle.label | typedReq |
42105
| rpc/notes/service.twirp.go:574:2:574:2 | capture variable reqContent | semmle.label | capture variable reqContent |
43106
| rpc/notes/service.twirp.go:576:35:576:44 | reqContent | semmle.label | reqContent |
107+
| rpc/notes/service.twirp.go:608:94:608:96 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
108+
| rpc/notes/service.twirp.go:608:94:608:96 | definition of req [pointer, Body] | semmle.label | definition of req [pointer, Body] |
109+
| rpc/notes/service.twirp.go:626:98:626:100 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
110+
| rpc/notes/service.twirp.go:635:23:635:25 | implicit dereference [Reverse] [Body] | semmle.label | implicit dereference [Reverse] [Body] |
111+
| rpc/notes/service.twirp.go:635:23:635:25 | req [Reverse] [pointer, Body] | semmle.label | req [Reverse] [pointer, Body] |
112+
| rpc/notes/service.twirp.go:635:23:635:30 | selection of Body | semmle.label | selection of Body |
113+
| rpc/notes/service.twirp.go:635:23:635:30 | selection of Body [Reverse] | semmle.label | selection of Body [Reverse] |
114+
| rpc/notes/service.twirp.go:709:102:709:104 | definition of req [Reverse] [pointer, Body] | semmle.label | definition of req [Reverse] [pointer, Body] |
115+
| rpc/notes/service.twirp.go:718:25:718:27 | implicit dereference [Reverse] [Body] | semmle.label | implicit dereference [Reverse] [Body] |
116+
| rpc/notes/service.twirp.go:718:25:718:27 | req [Reverse] [pointer, Body] | semmle.label | req [Reverse] [pointer, Body] |
117+
| rpc/notes/service.twirp.go:718:25:718:32 | selection of Body | semmle.label | selection of Body |
118+
| rpc/notes/service.twirp.go:718:25:718:32 | selection of Body [Reverse] | semmle.label | selection of Body [Reverse] |
44119
| server/main.go:19:56:19:61 | definition of params | semmle.label | definition of params |
45120
| server/main.go:19:56:19:61 | definition of params | semmle.label | definition of params |
46121
| server/main.go:19:56:19:61 | definition of params [Reverse] | semmle.label | definition of params [Reverse] |

0 commit comments

Comments
 (0)