Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24e4b68

Browse files
Removed getAnAccess() calls for Jackson
1 parent aefd210 commit 24e4b68

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SetPolymorphicTypeValidatorSource extends DataFlow::ExprNode {
8585
m.getDeclaringType() instanceof MapperBuilder and
8686
m.hasName("polymorphicTypeValidator")
8787
) and
88-
this.asExpr() = [q, q.(VarAccess).getVariable().getAnAccess()]
88+
this.asExpr() = q
8989
)
9090
}
9191
}
@@ -185,8 +185,7 @@ class EnabledJacksonDefaultTyping extends DataFlow2::Configuration {
185185
EnabledJacksonDefaultTyping() { this = "EnabledJacksonDefaultTyping" }
186186

187187
override predicate isSource(DataFlow::Node src) {
188-
any(EnableJacksonDefaultTyping ma).getQualifier().(VarAccess).getVariable().getAnAccess() =
189-
src.asExpr()
188+
any(EnableJacksonDefaultTyping ma).getQualifier() = src.asExpr()
190189
}
191190

192191
override predicate isSink(DataFlow::Node sink) { sink instanceof ObjectMapperReadSink }
@@ -212,7 +211,7 @@ class SafeObjectMapper extends DataFlow2::Configuration {
212211
.(RefType)
213212
.hasQualifiedName("com.fasterxml.jackson.databind.json",
214213
["JsonMapper$Builder", "JsonMapper"]) and
215-
fromNode.asExpr() = [q, q.(VarAccess).getVariable().getAnAccess()] and
214+
fromNode.asExpr() = q and
216215
ma = toNode.asExpr()
217216
)
218217
}

0 commit comments

Comments
 (0)