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
22import semmle.code.java.dataflow.FlowSources
33import TestUtilities.InlineFlowTest
44
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 }
137
14- override predicate isSink ( DataFlow:: Node sink ) {
8+ predicate isSink ( DataFlow:: Node sink ) {
159 sink .asExpr ( ) .( Argument ) .getCall ( ) .getCallee ( ) .hasName ( "sink" )
1610 }
1711}
1812
13+ module ValueFlow = DataFlow:: Global< ValueFlowConfig > ;
14+
1915class 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+ }
2119}
You can’t perform that action at this time.
0 commit comments