File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
java/ql/test/library-tests/frameworks/rabbitmq Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,18 @@ import semmle.code.java.dataflow.TaintTracking
3
3
import semmle.code.java.dataflow.FlowSources
4
4
import TestUtilities.InlineFlowTest
5
5
6
- class EnableLegacy extends EnableLegacyConfiguration {
7
- EnableLegacy ( ) { exists ( this ) }
8
- }
9
-
10
- class Conf extends TaintTracking:: Configuration {
11
- Conf ( ) { this = "qltest:frameworks:rabbitmq" }
6
+ module Config implements DataFlow:: ConfigSig {
7
+ predicate isSource ( DataFlow:: Node node ) { node instanceof RemoteFlowSource }
12
8
13
- override predicate isSource ( DataFlow:: Node node ) { node instanceof RemoteFlowSource }
14
-
15
- override predicate isSink ( DataFlow:: Node node ) {
9
+ predicate isSink ( DataFlow:: Node node ) {
16
10
exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( "sink" ) | node .asExpr ( ) = ma .getAnArgument ( ) )
17
11
}
18
12
}
19
13
14
+ module Flow = TaintTracking:: Global< Config > ;
15
+
20
16
class HasFlowTest extends InlineFlowTest {
21
- override DataFlow:: Configuration getValueFlowConfig ( ) { none ( ) }
17
+ override predicate hasValueFlow ( DataFlow:: Node src , DataFlow :: Node sink ) { none ( ) }
22
18
23
- override DataFlow:: Configuration getTaintFlowConfig ( ) { result = any ( Conf c ) }
19
+ override predicate hasTaintFlow ( DataFlow:: Node src , DataFlow :: Node sink ) { Flow :: flow ( src , sink ) }
24
20
}
You can’t perform that action at this time.
0 commit comments