@@ -52,9 +52,7 @@ class ValidatorValidate extends XmlParserCall {
5252
5353 override Expr getSink ( ) { result = this .getArgument ( 0 ) }
5454
55- override predicate isSafe ( ) {
56- exists ( SafeValidatorFlowConfig svfc | svfc .hasFlowToExpr ( this .getQualifier ( ) ) )
57- }
55+ override predicate isSafe ( ) { SafeValidatorFlow:: flowToExpr ( this .getQualifier ( ) ) }
5856}
5957
6058/** A `ParserConfig` specific to `Validator`. */
@@ -82,21 +80,21 @@ class SafeValidator extends VarAccess {
8280 }
8381}
8482
85- private class SafeValidatorFlowConfig extends DataFlow3:: Configuration {
86- SafeValidatorFlowConfig ( ) { this = "SafeValidatorFlowConfig" }
87-
88- override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeValidator }
83+ private module SafeValidatorFlowConfig implements DataFlow:: ConfigSig {
84+ predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeValidator }
8985
90- override predicate isSink ( DataFlow:: Node sink ) {
86+ predicate isSink ( DataFlow:: Node sink ) {
9187 exists ( MethodAccess ma |
9288 sink .asExpr ( ) = ma .getQualifier ( ) and
9389 ma .getMethod ( ) .getDeclaringType ( ) instanceof Validator
9490 )
9591 }
9692
97- override int fieldFlowBranchLimit ( ) { result = 0 }
93+ int fieldFlowBranchLimit ( ) { result = 0 }
9894}
9995
96+ private module SafeValidatorFlow = DataFlow:: Global< SafeValidatorFlowConfig > ;
97+
10098/**
10199 * The classes `org.apache.commons.digester3.Digester`, `org.apache.commons.digester.Digester` or `org.apache.tomcat.util.digester.Digester`.
102100 */
@@ -121,9 +119,7 @@ class DigesterParse extends XmlParserCall {
121119
122120 override Expr getSink ( ) { result = this .getArgument ( 0 ) }
123121
124- override predicate isSafe ( ) {
125- exists ( SafeDigesterFlowConfig sdfc | sdfc .hasFlowToExpr ( this .getQualifier ( ) ) )
126- }
122+ override predicate isSafe ( ) { SafeDigesterFlow:: flowToExpr ( this .getQualifier ( ) ) }
127123}
128124
129125/** A `ParserConfig` that is specific to `Digester`. */
@@ -170,20 +166,20 @@ class SafeDigester extends VarAccess {
170166 }
171167}
172168
173- private class SafeDigesterFlowConfig extends DataFlow4:: Configuration {
174- SafeDigesterFlowConfig ( ) { this = "SafeDigesterFlowConfig" }
175-
176- override predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeDigester }
169+ private module SafeDigesterFlowConfig implements DataFlow:: ConfigSig {
170+ predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof SafeDigester }
177171
178- override predicate isSink ( DataFlow:: Node sink ) {
172+ predicate isSink ( DataFlow:: Node sink ) {
179173 exists ( MethodAccess ma |
180174 sink .asExpr ( ) = ma .getQualifier ( ) and ma .getMethod ( ) .getDeclaringType ( ) instanceof Digester
181175 )
182176 }
183177
184- override int fieldFlowBranchLimit ( ) { result = 0 }
178+ int fieldFlowBranchLimit ( ) { result = 0 }
185179}
186180
181+ private module SafeDigesterFlow = DataFlow:: Global< SafeDigesterFlowConfig > ;
182+
187183/** The class `java.beans.XMLDecoder`. */
188184class XmlDecoder extends RefType {
189185 XmlDecoder ( ) { this .hasQualifiedName ( "java.beans" , "XMLDecoder" ) }
0 commit comments