add "valid" to the AdHocWhitelistCheckSanitizer

This commit is contained in:
Erik Krogh Kristensen
2020-05-11 16:44:24 +02:00
parent 8d41ce1630
commit bb8905b46e

View File

@@ -778,7 +778,8 @@ module TaintTracking {
*/
class AdHocWhitelistCheckSanitizer extends SanitizerGuardNode, DataFlow::CallNode {
AdHocWhitelistCheckSanitizer() {
getCalleeName().regexpMatch("(?i).*((?<!un)safe|whitelist|allow|(?<!un)auth(?!or\\b)).*") and
getCalleeName()
.regexpMatch("(?i).*((?<!un)safe|whitelist|valid|allow|(?<!un)auth(?!or\\b)).*") and
getNumArgument() = 1
}