Skip to content

Commit cbdbb03

Browse files
committed
Tidy up test (remove duplicated main)
1 parent 4e5a865 commit cbdbb03

File tree

2 files changed

+54
-56
lines changed

2 files changed

+54
-56
lines changed
Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
#select
2-
| HTMLTemplateEscapingPassthrough.go:30:39:30:39 | a | HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:30:39:30:39 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | untrusted source |
3-
| HTMLTemplateEscapingPassthrough.go:36:40:36:40 | a | HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:36:40:36:40 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | untrusted source |
4-
| HTMLTemplateEscapingPassthrough.go:41:40:41:40 | a | HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:41:40:41:40 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | untrusted source |
5-
| HTMLTemplateEscapingPassthrough.go:47:41:47:41 | c | HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:47:41:47:41 | c | Data from an $@ will not be auto-escaped because it was converted to template.HTMLAttr | HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | untrusted source |
6-
| HTMLTemplateEscapingPassthrough.go:51:44:51:44 | d | HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:51:44:51:44 | d | Data from an $@ will not be auto-escaped because it was converted to template.JS | HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | untrusted source |
7-
| HTMLTemplateEscapingPassthrough.go:55:44:55:44 | e | HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:55:44:55:44 | e | Data from an $@ will not be auto-escaped because it was converted to template.JSStr | HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | untrusted source |
8-
| HTMLTemplateEscapingPassthrough.go:59:38:59:38 | b | HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:59:38:59:38 | b | Data from an $@ will not be auto-escaped because it was converted to template.CSS | HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | untrusted source |
9-
| HTMLTemplateEscapingPassthrough.go:63:44:63:44 | f | HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:63:44:63:44 | f | Data from an $@ will not be auto-escaped because it was converted to template.Srcset | HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | untrusted source |
10-
| HTMLTemplateEscapingPassthrough.go:67:38:67:38 | g | HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:67:38:67:38 | g | Data from an $@ will not be auto-escaped because it was converted to template.URL | HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | untrusted source |
2+
| HTMLTemplateEscapingPassthrough.go:28:39:28:39 | a | HTMLTemplateEscapingPassthrough.go:27:26:27:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:28:39:28:39 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:27:26:27:40 | call to UserAgent | untrusted source |
3+
| HTMLTemplateEscapingPassthrough.go:34:40:34:40 | a | HTMLTemplateEscapingPassthrough.go:33:23:33:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:34:40:34:40 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:33:23:33:37 | call to UserAgent | untrusted source |
4+
| HTMLTemplateEscapingPassthrough.go:39:40:39:40 | a | HTMLTemplateEscapingPassthrough.go:38:19:38:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:39:40:39:40 | a | Data from an $@ will not be auto-escaped because it was converted to template.HTML | HTMLTemplateEscapingPassthrough.go:38:19:38:33 | call to UserAgent | untrusted source |
5+
| HTMLTemplateEscapingPassthrough.go:45:41:45:41 | c | HTMLTemplateEscapingPassthrough.go:44:29:44:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:45:41:45:41 | c | Data from an $@ will not be auto-escaped because it was converted to template.HTMLAttr | HTMLTemplateEscapingPassthrough.go:44:29:44:43 | call to UserAgent | untrusted source |
6+
| HTMLTemplateEscapingPassthrough.go:49:44:49:44 | d | HTMLTemplateEscapingPassthrough.go:48:23:48:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:49:44:49:44 | d | Data from an $@ will not be auto-escaped because it was converted to template.JS | HTMLTemplateEscapingPassthrough.go:48:23:48:37 | call to UserAgent | untrusted source |
7+
| HTMLTemplateEscapingPassthrough.go:53:44:53:44 | e | HTMLTemplateEscapingPassthrough.go:52:26:52:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:53:44:53:44 | e | Data from an $@ will not be auto-escaped because it was converted to template.JSStr | HTMLTemplateEscapingPassthrough.go:52:26:52:40 | call to UserAgent | untrusted source |
8+
| HTMLTemplateEscapingPassthrough.go:57:38:57:38 | b | HTMLTemplateEscapingPassthrough.go:56:24:56:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:57:38:57:38 | b | Data from an $@ will not be auto-escaped because it was converted to template.CSS | HTMLTemplateEscapingPassthrough.go:56:24:56:38 | call to UserAgent | untrusted source |
9+
| HTMLTemplateEscapingPassthrough.go:61:44:61:44 | f | HTMLTemplateEscapingPassthrough.go:60:27:60:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:61:44:61:44 | f | Data from an $@ will not be auto-escaped because it was converted to template.Srcset | HTMLTemplateEscapingPassthrough.go:60:27:60:41 | call to UserAgent | untrusted source |
10+
| HTMLTemplateEscapingPassthrough.go:65:38:65:38 | g | HTMLTemplateEscapingPassthrough.go:64:24:64:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:65:38:65:38 | g | Data from an $@ will not be auto-escaped because it was converted to template.URL | HTMLTemplateEscapingPassthrough.go:64:24:64:38 | call to UserAgent | untrusted source |
1111
edges
12-
| HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | HTMLTemplateEscapingPassthrough.go:30:39:30:39 | a | provenance | |
13-
| HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | provenance | Src:MaD:1 Config |
14-
| HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | HTMLTemplateEscapingPassthrough.go:36:40:36:40 | a | provenance | |
15-
| HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | provenance | Src:MaD:1 Config |
16-
| HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | HTMLTemplateEscapingPassthrough.go:41:40:41:40 | a | provenance | |
17-
| HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | provenance | Src:MaD:1 Config |
18-
| HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | HTMLTemplateEscapingPassthrough.go:47:41:47:41 | c | provenance | |
19-
| HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | provenance | Src:MaD:1 Config |
20-
| HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | HTMLTemplateEscapingPassthrough.go:51:44:51:44 | d | provenance | |
21-
| HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | provenance | Src:MaD:1 Config |
22-
| HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | HTMLTemplateEscapingPassthrough.go:55:44:55:44 | e | provenance | |
23-
| HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | provenance | Src:MaD:1 Config |
24-
| HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | HTMLTemplateEscapingPassthrough.go:59:38:59:38 | b | provenance | |
25-
| HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | provenance | Src:MaD:1 Config |
26-
| HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | HTMLTemplateEscapingPassthrough.go:63:44:63:44 | f | provenance | |
27-
| HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | provenance | Src:MaD:1 Config |
28-
| HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | HTMLTemplateEscapingPassthrough.go:67:38:67:38 | g | provenance | |
29-
| HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | provenance | Src:MaD:1 Config |
12+
| HTMLTemplateEscapingPassthrough.go:27:12:27:41 | type conversion | HTMLTemplateEscapingPassthrough.go:28:39:28:39 | a | provenance | |
13+
| HTMLTemplateEscapingPassthrough.go:27:26:27:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:27:12:27:41 | type conversion | provenance | Src:MaD:1 Config |
14+
| HTMLTemplateEscapingPassthrough.go:33:9:33:38 | type conversion | HTMLTemplateEscapingPassthrough.go:34:40:34:40 | a | provenance | |
15+
| HTMLTemplateEscapingPassthrough.go:33:23:33:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:33:9:33:38 | type conversion | provenance | Src:MaD:1 Config |
16+
| HTMLTemplateEscapingPassthrough.go:38:9:38:34 | type conversion | HTMLTemplateEscapingPassthrough.go:39:40:39:40 | a | provenance | |
17+
| HTMLTemplateEscapingPassthrough.go:38:19:38:33 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:38:9:38:34 | type conversion | provenance | Src:MaD:1 Config |
18+
| HTMLTemplateEscapingPassthrough.go:44:11:44:44 | type conversion | HTMLTemplateEscapingPassthrough.go:45:41:45:41 | c | provenance | |
19+
| HTMLTemplateEscapingPassthrough.go:44:29:44:43 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:44:11:44:44 | type conversion | provenance | Src:MaD:1 Config |
20+
| HTMLTemplateEscapingPassthrough.go:48:11:48:38 | type conversion | HTMLTemplateEscapingPassthrough.go:49:44:49:44 | d | provenance | |
21+
| HTMLTemplateEscapingPassthrough.go:48:23:48:37 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:48:11:48:38 | type conversion | provenance | Src:MaD:1 Config |
22+
| HTMLTemplateEscapingPassthrough.go:52:11:52:41 | type conversion | HTMLTemplateEscapingPassthrough.go:53:44:53:44 | e | provenance | |
23+
| HTMLTemplateEscapingPassthrough.go:52:26:52:40 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:52:11:52:41 | type conversion | provenance | Src:MaD:1 Config |
24+
| HTMLTemplateEscapingPassthrough.go:56:11:56:39 | type conversion | HTMLTemplateEscapingPassthrough.go:57:38:57:38 | b | provenance | |
25+
| HTMLTemplateEscapingPassthrough.go:56:24:56:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:56:11:56:39 | type conversion | provenance | Src:MaD:1 Config |
26+
| HTMLTemplateEscapingPassthrough.go:60:11:60:42 | type conversion | HTMLTemplateEscapingPassthrough.go:61:44:61:44 | f | provenance | |
27+
| HTMLTemplateEscapingPassthrough.go:60:27:60:41 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:60:11:60:42 | type conversion | provenance | Src:MaD:1 Config |
28+
| HTMLTemplateEscapingPassthrough.go:64:11:64:39 | type conversion | HTMLTemplateEscapingPassthrough.go:65:38:65:38 | g | provenance | |
29+
| HTMLTemplateEscapingPassthrough.go:64:24:64:38 | call to UserAgent | HTMLTemplateEscapingPassthrough.go:64:11:64:39 | type conversion | provenance | Src:MaD:1 Config |
3030
models
3131
| 1 | Source: net/http; Request; true; UserAgent; ; ; ReturnValue; remote; manual |
3232
nodes
33-
| HTMLTemplateEscapingPassthrough.go:29:12:29:41 | type conversion | semmle.label | type conversion |
34-
| HTMLTemplateEscapingPassthrough.go:29:26:29:40 | call to UserAgent | semmle.label | call to UserAgent |
35-
| HTMLTemplateEscapingPassthrough.go:30:39:30:39 | a | semmle.label | a |
36-
| HTMLTemplateEscapingPassthrough.go:35:9:35:38 | type conversion | semmle.label | type conversion |
37-
| HTMLTemplateEscapingPassthrough.go:35:23:35:37 | call to UserAgent | semmle.label | call to UserAgent |
38-
| HTMLTemplateEscapingPassthrough.go:36:40:36:40 | a | semmle.label | a |
39-
| HTMLTemplateEscapingPassthrough.go:40:9:40:34 | type conversion | semmle.label | type conversion |
40-
| HTMLTemplateEscapingPassthrough.go:40:19:40:33 | call to UserAgent | semmle.label | call to UserAgent |
41-
| HTMLTemplateEscapingPassthrough.go:41:40:41:40 | a | semmle.label | a |
42-
| HTMLTemplateEscapingPassthrough.go:46:11:46:44 | type conversion | semmle.label | type conversion |
43-
| HTMLTemplateEscapingPassthrough.go:46:29:46:43 | call to UserAgent | semmle.label | call to UserAgent |
44-
| HTMLTemplateEscapingPassthrough.go:47:41:47:41 | c | semmle.label | c |
45-
| HTMLTemplateEscapingPassthrough.go:50:11:50:38 | type conversion | semmle.label | type conversion |
46-
| HTMLTemplateEscapingPassthrough.go:50:23:50:37 | call to UserAgent | semmle.label | call to UserAgent |
47-
| HTMLTemplateEscapingPassthrough.go:51:44:51:44 | d | semmle.label | d |
48-
| HTMLTemplateEscapingPassthrough.go:54:11:54:41 | type conversion | semmle.label | type conversion |
49-
| HTMLTemplateEscapingPassthrough.go:54:26:54:40 | call to UserAgent | semmle.label | call to UserAgent |
50-
| HTMLTemplateEscapingPassthrough.go:55:44:55:44 | e | semmle.label | e |
51-
| HTMLTemplateEscapingPassthrough.go:58:11:58:39 | type conversion | semmle.label | type conversion |
52-
| HTMLTemplateEscapingPassthrough.go:58:24:58:38 | call to UserAgent | semmle.label | call to UserAgent |
53-
| HTMLTemplateEscapingPassthrough.go:59:38:59:38 | b | semmle.label | b |
54-
| HTMLTemplateEscapingPassthrough.go:62:11:62:42 | type conversion | semmle.label | type conversion |
55-
| HTMLTemplateEscapingPassthrough.go:62:27:62:41 | call to UserAgent | semmle.label | call to UserAgent |
56-
| HTMLTemplateEscapingPassthrough.go:63:44:63:44 | f | semmle.label | f |
57-
| HTMLTemplateEscapingPassthrough.go:66:11:66:39 | type conversion | semmle.label | type conversion |
58-
| HTMLTemplateEscapingPassthrough.go:66:24:66:38 | call to UserAgent | semmle.label | call to UserAgent |
59-
| HTMLTemplateEscapingPassthrough.go:67:38:67:38 | g | semmle.label | g |
33+
| HTMLTemplateEscapingPassthrough.go:27:12:27:41 | type conversion | semmle.label | type conversion |
34+
| HTMLTemplateEscapingPassthrough.go:27:26:27:40 | call to UserAgent | semmle.label | call to UserAgent |
35+
| HTMLTemplateEscapingPassthrough.go:28:39:28:39 | a | semmle.label | a |
36+
| HTMLTemplateEscapingPassthrough.go:33:9:33:38 | type conversion | semmle.label | type conversion |
37+
| HTMLTemplateEscapingPassthrough.go:33:23:33:37 | call to UserAgent | semmle.label | call to UserAgent |
38+
| HTMLTemplateEscapingPassthrough.go:34:40:34:40 | a | semmle.label | a |
39+
| HTMLTemplateEscapingPassthrough.go:38:9:38:34 | type conversion | semmle.label | type conversion |
40+
| HTMLTemplateEscapingPassthrough.go:38:19:38:33 | call to UserAgent | semmle.label | call to UserAgent |
41+
| HTMLTemplateEscapingPassthrough.go:39:40:39:40 | a | semmle.label | a |
42+
| HTMLTemplateEscapingPassthrough.go:44:11:44:44 | type conversion | semmle.label | type conversion |
43+
| HTMLTemplateEscapingPassthrough.go:44:29:44:43 | call to UserAgent | semmle.label | call to UserAgent |
44+
| HTMLTemplateEscapingPassthrough.go:45:41:45:41 | c | semmle.label | c |
45+
| HTMLTemplateEscapingPassthrough.go:48:11:48:38 | type conversion | semmle.label | type conversion |
46+
| HTMLTemplateEscapingPassthrough.go:48:23:48:37 | call to UserAgent | semmle.label | call to UserAgent |
47+
| HTMLTemplateEscapingPassthrough.go:49:44:49:44 | d | semmle.label | d |
48+
| HTMLTemplateEscapingPassthrough.go:52:11:52:41 | type conversion | semmle.label | type conversion |
49+
| HTMLTemplateEscapingPassthrough.go:52:26:52:40 | call to UserAgent | semmle.label | call to UserAgent |
50+
| HTMLTemplateEscapingPassthrough.go:53:44:53:44 | e | semmle.label | e |
51+
| HTMLTemplateEscapingPassthrough.go:56:11:56:39 | type conversion | semmle.label | type conversion |
52+
| HTMLTemplateEscapingPassthrough.go:56:24:56:38 | call to UserAgent | semmle.label | call to UserAgent |
53+
| HTMLTemplateEscapingPassthrough.go:57:38:57:38 | b | semmle.label | b |
54+
| HTMLTemplateEscapingPassthrough.go:60:11:60:42 | type conversion | semmle.label | type conversion |
55+
| HTMLTemplateEscapingPassthrough.go:60:27:60:41 | call to UserAgent | semmle.label | call to UserAgent |
56+
| HTMLTemplateEscapingPassthrough.go:61:44:61:44 | f | semmle.label | f |
57+
| HTMLTemplateEscapingPassthrough.go:64:11:64:39 | type conversion | semmle.label | type conversion |
58+
| HTMLTemplateEscapingPassthrough.go:64:24:64:38 | call to UserAgent | semmle.label | call to UserAgent |
59+
| HTMLTemplateEscapingPassthrough.go:65:38:65:38 | g | semmle.label | g |
6060
subpaths

go/ql/test/query-tests/Security/CWE-079/HTMLTemplateEscapingPassthrough.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"strconv"
88
)
99

10-
func main() {}
11-
1210
func checkError(err error) {
1311
if err != nil {
1412
panic(err)

0 commit comments

Comments
 (0)