Skip to content

Commit b1a3633

Browse files
committed
Java: Remove redundant condition + docs.
1 parent 98dcd4e commit b1a3633

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private predicate isSigningKeySetter(Expr expr, MethodAccess signingMa) {
124124
}
125125

126126
/**
127-
* An expr that is a `JwtParser` for which a signing key has been set and which is used as
127+
* An expr that is a (sub-type of) `JwtParser` for which a signing key has been set and which is used as
128128
* the qualifier to a `JwtParserInsecureParseMethodAccess`.
129129
*/
130130
private class JwtParserWithSigningKeyExpr extends Expr {
@@ -140,8 +140,7 @@ private class JwtParserWithSigningKeyExpr extends Expr {
140140
}
141141

142142
/**
143-
* Models flow from `SigningKeyMethodAccess`es to expressions that are a
144-
* (sub-type of) `JwtParser` and which are also the qualifier to a `JwtParserInsecureParseMethodAccess`.
143+
* Models flow from `SigningKeyMethodAccess`es to qualifiers of `JwtParserInsecureParseMethodAccess`es.
145144
* This is used to determine whether a `JwtParser` has a signing key set.
146145
*/
147146
private class SigningToInsecureMethodAccessDataFlow extends DataFlow::Configuration {
@@ -152,7 +151,6 @@ private class SigningToInsecureMethodAccessDataFlow extends DataFlow::Configurat
152151
}
153152

154153
override predicate isSink(DataFlow::Node sink) {
155-
sink.asExpr().getType() instanceof TypeDerivedJwtParser and
156154
any(JwtParserInsecureParseMethodAccess ma).getQualifier() = sink.asExpr()
157155
}
158156

0 commit comments

Comments
 (0)