@@ -87,6 +87,7 @@ private import internal.FlowSummaryImplSpecific as FlowSummaryImplSpecific
8787private import internal.AccessPathSyntax
8888private import ExternalFlowExtensions as Extensions
8989private import FlowSummary
90+ private import SharedModelValidation
9091
9192/**
9293 * A class for activating additional model rows.
@@ -267,33 +268,37 @@ module ModelValidation {
267268
268269 private string getInvalidModelKind ( ) {
269270 exists ( string kind | summaryModel ( _, _, _, _, _, _, _, _, kind , _) |
270- not kind = [ "taint" , "value" ] and
271+ not kind instanceof ValidSummaryKind and
272+ //not kind = ["taint", "value"] and
271273 result = "Invalid kind \"" + kind + "\" in summary model."
272274 )
273275 or
274276 exists ( string kind | sinkModel ( _, _, _, _, _, _, _, kind , _) |
275- not kind =
276- [
277- "request-forgery" , "jndi-injection" , "ldap-injection" , "sql-injection" , "log-injection" ,
278- "mvel-injection" , "xpath-injection" , "groovy-injection" , "html-injection" , "js-injection" ,
279- "ognl-injection" , "intent-redirection" , "pending-intents" , "url-redirection" ,
280- "path-injection" , "file-content-store" , "hostname-verification" , "response-splitting" ,
281- "information-leak" , "xslt-injection" , "jexl-injection" , "bean-validation" ,
282- "template-injection" , "fragment-injection" , "command-injection"
283- ] and
277+ not kind instanceof ValidSinkKind and
278+ // not kind =
279+ // [
280+ // "request-forgery", "jndi-injection", "ldap-injection", "sql-injection", "log-injection",
281+ // "mvel-injection", "xpath-injection", "groovy-injection", "html-injection", "js-injection",
282+ // "ognl-injection", "intent-redirection", "pending-intents", "url-redirection",
283+ // "path-injection", "file-content-store", "hostname-verification", "response-splitting",
284+ // "information-leak", "xslt-injection", "jexl-injection", "bean-validation",
285+ // "template-injection", "fragment-injection", "command-injection"
286+ // ] and
284287 not kind .matches ( "regex-use%" ) and
285288 not kind .matches ( "qltest%" ) and
286289 result = "Invalid kind \"" + kind + "\" in sink model."
287290 )
288291 or
289292 exists ( string kind | sourceModel ( _, _, _, _, _, _, _, kind , _) |
290- not kind = [ "remote" , "contentprovider" , "android-widget" , "android-external-storage-dir" ] and
293+ not kind instanceof ValidSourceKind and
294+ // not kind = ["remote", "contentprovider", "android-widget", "android-external-storage-dir"] and
291295 not kind .matches ( "qltest%" ) and
292296 result = "Invalid kind \"" + kind + "\" in source model."
293297 )
294298 or
295299 exists ( string kind | neutralModel ( _, _, _, _, kind , _) |
296- not kind = [ "summary" , "source" , "sink" ] and
300+ not kind instanceof ValidNeutralKind and
301+ //not kind = ["summary", "source", "sink"] and
297302 result = "Invalid kind \"" + kind + "\" in neutral model."
298303 )
299304 }
0 commit comments