1
1
import go
2
2
3
3
/**
4
+ * A class that contains the following function and method:
5
+ *
4
6
* func (p *Parser) Parse(tokenString string, keyFunc Keyfunc)
7
+ *
5
8
* func Parse(tokenString string, keyFunc Keyfunc)
6
9
*/
7
10
class GolangJwtParse extends Function {
@@ -33,7 +36,10 @@ class GolangJwtParse extends Function {
33
36
}
34
37
35
38
/**
39
+ * A class that contains the following function and method:
40
+ *
36
41
* func (p *Parser) Parse(tokenString string, keyFunc Keyfunc)
42
+ *
37
43
* func Parse(tokenString string, keyFunc Keyfunc)
38
44
*/
39
45
class GolangJwtValidField extends DataFlow:: FieldReadNode {
@@ -48,7 +54,10 @@ class GolangJwtValidField extends DataFlow::FieldReadNode {
48
54
}
49
55
50
56
/**
57
+ * A class that contains the following function and method:
58
+ *
51
59
* func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc)
60
+ *
52
61
* func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc)
53
62
*/
54
63
class GolangJwtParseWithClaims extends Function {
@@ -80,6 +89,8 @@ class GolangJwtParseWithClaims extends Function {
80
89
}
81
90
82
91
/**
92
+ * A class that contains the following method:
93
+ *
83
94
* func (p *Parser) ParseUnverified(tokenString string, claims Claims)
84
95
*/
85
96
class GolangJwtParseUnverified extends Function {
@@ -97,6 +108,8 @@ class GolangJwtParseUnverified extends Function {
97
108
}
98
109
99
110
/**
111
+ * A class that contains the following function:
112
+ *
100
113
* func ParseFromRequest(req *http.Request, extractor Extractor, keyFunc jwt.Keyfunc, options ...ParseFromRequestOption)
101
114
*/
102
115
class GolangJwtParseFromRequest extends Function {
@@ -117,6 +130,8 @@ class GolangJwtParseFromRequest extends Function {
117
130
}
118
131
119
132
/**
133
+ * A class that contains the following function:
134
+ *
120
135
* func ParseFromRequestWithClaims(req *http.Request, extractor Extractor, claims jwt.Claims, keyFunc jwt.Keyfunc)
121
136
*/
122
137
class GolangJwtParseFromRequestWithClaims extends Function {
@@ -137,6 +152,8 @@ class GolangJwtParseFromRequestWithClaims extends Function {
137
152
}
138
153
139
154
/**
155
+ * A class that contains the following method:
156
+ *
140
157
*func (t *JSONWebToken) Claims(key interface{}, dest ...interface{})
141
158
*/
142
159
class GoJoseClaims extends Function {
@@ -159,7 +176,9 @@ class GoJoseClaims extends Function {
159
176
}
160
177
161
178
/**
162
- * func (t *JSONWebToken) UnsafeClaimsWithoutVerification(dest ...interface{})
179
+ * A class that contains the following method:
180
+ *
181
+ * func (t *JSONWebToken) UnsafeClaimsWithoutVerification(dest ...interface{})
163
182
*/
164
183
class GoJoseUnsafeClaims extends Function {
165
184
GoJoseUnsafeClaims ( ) {
@@ -176,6 +195,9 @@ class GoJoseUnsafeClaims extends Function {
176
195
}
177
196
}
178
197
198
+ /**
199
+ * Holds if there are additioanl steps related to parsing the secret keys
200
+ */
179
201
predicate golangJwtIsAdditionalFlowStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
180
202
exists ( DataFlow:: Function f , DataFlow:: CallNode call |
181
203
f .hasQualifiedName ( [
@@ -213,6 +235,9 @@ predicate golangJwtIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node
213
235
)
214
236
}
215
237
238
+ /**
239
+ * Holds if there are additioanl steps related to parsing the secret keys
240
+ */
216
241
predicate goJoseIsAdditionalFlowStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
217
242
exists ( DataFlow:: Function f , DataFlow:: CallNode call |
218
243
f .hasQualifiedName ( [
0 commit comments