Remove specific method name in additional taint step

This commit is contained in:
luchua-bc
2021-01-07 16:31:21 +00:00
parent 19ff00bad4
commit b56fe2b25f

View File

@@ -76,11 +76,10 @@ class HashWithoutSaltConfiguration extends TaintTracking::Configuration {
)
}
/** Holds for additional steps that flow to a method call of `update` or `digest` declared in `java.security.MessageDigest`. */
/** Holds for additional steps that flow to additional method calls of the type `java.security.MessageDigest`. */
override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(MethodAccess ma |
ma.getMethod().getDeclaringType() instanceof MessageDigest and
ma.getMethod().hasName(["digest", "update"]) and
pred.asExpr() = ma.getAnArgument() and
(succ.asExpr() = ma or succ.asExpr() = ma.getQualifier())
)