File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
java/ql/test/library-tests/frameworks/spring/controller Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,18 @@ import java
2
2
import semmle.code.java.dataflow.FlowSources
3
3
import TestUtilities.InlineFlowTest
4
4
5
- class EnableLegacy extends EnableLegacyConfiguration {
6
- EnableLegacy ( ) { exists ( this ) }
7
- }
8
-
9
- class ValueFlowConf extends DataFlow:: Configuration {
10
- ValueFlowConf ( ) { this = "ValueFlowConf" }
11
-
12
- override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
5
+ module ValueFlowConfig implements DataFlow:: ConfigSig {
6
+ predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
13
7
14
- override predicate isSink ( DataFlow:: Node sink ) {
8
+ predicate isSink ( DataFlow:: Node sink ) {
15
9
sink .asExpr ( ) .( Argument ) .getCall ( ) .getCallee ( ) .hasName ( "sink" )
16
10
}
17
11
}
18
12
13
+ module ValueFlow = DataFlow:: Global< ValueFlowConfig > ;
14
+
19
15
class Test extends InlineFlowTest {
20
- override DataFlow:: Configuration getValueFlowConfig ( ) { result = any ( ValueFlowConf config ) }
16
+ override predicate hasValueFlow ( DataFlow:: Node src , DataFlow:: Node sink ) {
17
+ ValueFlow:: flow ( src , sink )
18
+ }
21
19
}
You can’t perform that action at this time.
0 commit comments