Skip to content

Commit da864bf

Browse files
committed
fix QLDoc
1 parent a96b001 commit da864bf

File tree

1 file changed

+26
-1
lines changed
  • go/ql/lib/semmle/go/security

1 file changed

+26
-1
lines changed

go/ql/lib/semmle/go/security/JWT.qll

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import 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
*/
710
class 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
*/
3945
class 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
*/
5463
class 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
*/
8596
class 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
*/
102115
class 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
*/
122137
class 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
*/
142159
class 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
*/
164183
class 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+
*/
179201
predicate 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+
*/
216241
predicate goJoseIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
217242
exists(DataFlow::Function f, DataFlow::CallNode call |
218243
f.hasQualifiedName([

0 commit comments

Comments
 (0)