11import go
22
33/**
4+ * A class that contains the following function and method:
5+ *
46 * func (p *Parser) Parse(tokenString string, keyFunc Keyfunc)
7+ *
58 * func Parse(tokenString string, keyFunc Keyfunc)
69 */
710class GolangJwtParse extends Function {
@@ -33,7 +36,10 @@ class GolangJwtParse extends Function {
3336}
3437
3538/**
39+ * A class that contains the following function and method:
40+ *
3641 * func (p *Parser) Parse(tokenString string, keyFunc Keyfunc)
42+ *
3743 * func Parse(tokenString string, keyFunc Keyfunc)
3844 */
3945class GolangJwtValidField extends DataFlow:: FieldReadNode {
@@ -48,7 +54,10 @@ class GolangJwtValidField extends DataFlow::FieldReadNode {
4854}
4955
5056/**
57+ * A class that contains the following function and method:
58+ *
5159 * func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc)
60+ *
5261 * func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc)
5362 */
5463class GolangJwtParseWithClaims extends Function {
@@ -80,6 +89,8 @@ class GolangJwtParseWithClaims extends Function {
8089}
8190
8291/**
92+ * A class that contains the following method:
93+ *
8394 * func (p *Parser) ParseUnverified(tokenString string, claims Claims)
8495 */
8596class GolangJwtParseUnverified extends Function {
@@ -97,6 +108,8 @@ class GolangJwtParseUnverified extends Function {
97108}
98109
99110/**
111+ * A class that contains the following function:
112+ *
100113 * func ParseFromRequest(req *http.Request, extractor Extractor, keyFunc jwt.Keyfunc, options ...ParseFromRequestOption)
101114 */
102115class GolangJwtParseFromRequest extends Function {
@@ -117,6 +130,8 @@ class GolangJwtParseFromRequest extends Function {
117130}
118131
119132/**
133+ * A class that contains the following function:
134+ *
120135 * func ParseFromRequestWithClaims(req *http.Request, extractor Extractor, claims jwt.Claims, keyFunc jwt.Keyfunc)
121136 */
122137class GolangJwtParseFromRequestWithClaims extends Function {
@@ -137,6 +152,8 @@ class GolangJwtParseFromRequestWithClaims extends Function {
137152}
138153
139154/**
155+ * A class that contains the following method:
156+ *
140157 *func (t *JSONWebToken) Claims(key interface{}, dest ...interface{})
141158 */
142159class GoJoseClaims extends Function {
@@ -159,7 +176,9 @@ class GoJoseClaims extends Function {
159176}
160177
161178/**
162- * func (t *JSONWebToken) UnsafeClaimsWithoutVerification(dest ...interface{})
179+ * A class that contains the following method:
180+ *
181+ * func (t *JSONWebToken) UnsafeClaimsWithoutVerification(dest ...interface{})
163182 */
164183class GoJoseUnsafeClaims extends Function {
165184 GoJoseUnsafeClaims ( ) {
@@ -176,6 +195,9 @@ class GoJoseUnsafeClaims extends Function {
176195 }
177196}
178197
198+ /**
199+ * Holds if there are additioanl steps related to parsing the secret keys
200+ */
179201predicate golangJwtIsAdditionalFlowStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
180202 exists ( DataFlow:: Function f , DataFlow:: CallNode call |
181203 f .hasQualifiedName ( [
@@ -213,6 +235,9 @@ predicate golangJwtIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node
213235 )
214236}
215237
238+ /**
239+ * Holds if there are additioanl steps related to parsing the secret keys
240+ */
216241predicate goJoseIsAdditionalFlowStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
217242 exists ( DataFlow:: Function f , DataFlow:: CallNode call |
218243 f .hasQualifiedName ( [
0 commit comments