@@ -61,37 +61,11 @@ private module DefaultValueFlow = DataFlow::Global<DefaultFlowConfig>;
61
61
62
62
private module DefaultTaintFlow = TaintTracking:: Global< DefaultFlowConfig > ;
63
63
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
-
88
64
private string getSourceArgString ( DataFlow:: Node src ) {
89
65
defaultSource ( src ) and
90
66
src .asExpr ( ) .( MethodAccess ) .getAnArgument ( ) .( StringLiteral ) .getValue ( ) = result
91
67
}
92
68
93
- abstract class EnableLegacyConfiguration extends Unit { }
94
-
95
69
class InlineFlowTest extends InlineExpectationsTest {
96
70
InlineFlowTest ( ) { this = "HasFlowTest" }
97
71
@@ -116,18 +90,10 @@ class InlineFlowTest extends InlineExpectationsTest {
116
90
}
117
91
118
92
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 )
122
94
}
123
95
124
96
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 )
128
98
}
129
-
130
- DataFlow:: Configuration getValueFlowConfig ( ) { result = any ( DefaultValueFlowConf config ) }
131
-
132
- DataFlow:: Configuration getTaintFlowConfig ( ) { result = any ( DefaultTaintFlowConf config ) }
133
99
}
0 commit comments