mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Import UnsafeDeserializationQuery in unsafeDeserialization.ql
This commit is contained in:
@@ -121,7 +121,10 @@ private class SafeKryo extends DataFlow2::Configuration {
|
||||
}
|
||||
}
|
||||
|
||||
private predicate unsafeDeserialization(MethodAccess ma, Expr sink) {
|
||||
/**
|
||||
* Holds if `ma` is a call that triggers deserialization with tainted data from `sink`.
|
||||
*/
|
||||
predicate unsafeDeserialization(MethodAccess ma, Expr sink) {
|
||||
exists(Method m | m = ma.getMethod() |
|
||||
m instanceof ObjectInputStreamReadObjectMethod and
|
||||
sink = ma.getQualifier() and
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import default
|
||||
import semmle.code.java.security.UnsafeDeserialization
|
||||
import semmle.code.java.security.UnsafeDeserializationQuery
|
||||
|
||||
from Method m, MethodAccess ma
|
||||
where ma.getMethod() = m and unsafeDeserialization(ma, _)
|
||||
|
||||
Reference in New Issue
Block a user