@@ -61,37 +61,11 @@ private module DefaultValueFlow = DataFlow::Global<DefaultFlowConfig>;
6161
6262private module DefaultTaintFlow = TaintTracking:: Global< DefaultFlowConfig > ;
6363
64- class DefaultValueFlowConf extends DataFlow:: Configuration {
65- DefaultValueFlowConf ( ) { this = "qltest:defaultValueFlowConf" }
66-
67- override predicate isSource ( DataFlow:: Node n ) { defaultSource ( n ) }
68-
69- override predicate isSink ( DataFlow:: Node n ) {
70- exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( "sink" ) | n .asExpr ( ) = ma .getAnArgument ( ) )
71- }
72-
73- override int fieldFlowBranchLimit ( ) { result = 1000 }
74- }
75-
76- class DefaultTaintFlowConf extends TaintTracking:: Configuration {
77- DefaultTaintFlowConf ( ) { this = "qltest:defaultTaintFlowConf" }
78-
79- override predicate isSource ( DataFlow:: Node n ) { defaultSource ( n ) }
80-
81- override predicate isSink ( DataFlow:: Node n ) {
82- exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( "sink" ) | n .asExpr ( ) = ma .getAnArgument ( ) )
83- }
84-
85- override int fieldFlowBranchLimit ( ) { result = 1000 }
86- }
87-
8864private string getSourceArgString ( DataFlow:: Node src ) {
8965 defaultSource ( src ) and
9066 src .asExpr ( ) .( MethodAccess ) .getAnArgument ( ) .( StringLiteral ) .getValue ( ) = result
9167}
9268
93- abstract class EnableLegacyConfiguration extends Unit { }
94-
9569class InlineFlowTest extends InlineExpectationsTest {
9670 InlineFlowTest ( ) { this = "HasFlowTest" }
9771
@@ -116,18 +90,10 @@ class InlineFlowTest extends InlineExpectationsTest {
11690 }
11791
11892 predicate hasValueFlow ( DataFlow:: Node src , DataFlow:: Node sink ) {
119- if exists ( EnableLegacyConfiguration e )
120- then getValueFlowConfig ( ) .hasFlow ( src , sink )
121- else DefaultValueFlow:: flow ( src , sink )
93+ DefaultValueFlow:: flow ( src , sink )
12294 }
12395
12496 predicate hasTaintFlow ( DataFlow:: Node src , DataFlow:: Node sink ) {
125- if exists ( EnableLegacyConfiguration e )
126- then getTaintFlowConfig ( ) .hasFlow ( src , sink )
127- else DefaultTaintFlow:: flow ( src , sink )
97+ DefaultTaintFlow:: flow ( src , sink )
12898 }
129-
130- DataFlow:: Configuration getValueFlowConfig ( ) { result = any ( DefaultValueFlowConf config ) }
131-
132- DataFlow:: Configuration getTaintFlowConfig ( ) { result = any ( DefaultTaintFlowConf config ) }
13399}
0 commit comments