File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
java/ql/test/library-tests/frameworks/jms Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2,26 +2,26 @@ import java
2
2
import semmle.code.java.dataflow.FlowSources
3
3
import TestUtilities.InlineExpectationsTest
4
4
5
- class TestConfig extends TaintTracking :: Configuration {
6
- TestConfig ( ) { this = "TestConfig" }
5
+ module TestConfig implements DataFlow :: ConfigSig {
6
+ predicate isSource ( DataFlow :: Node source ) { source instanceof RemoteFlowSource }
7
7
8
- override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
9
-
10
- override predicate isSink ( DataFlow:: Node sink ) {
8
+ predicate isSink ( DataFlow:: Node sink ) {
11
9
exists ( MethodAccess call |
12
10
call .getMethod ( ) .hasName ( "sink" ) and call .getArgument ( 0 ) = sink .asExpr ( )
13
11
)
14
12
}
15
13
}
16
14
15
+ module TestFlow = TaintTracking:: Global< TestConfig > ;
16
+
17
17
class JmsFlowTest extends InlineExpectationsTest {
18
18
JmsFlowTest ( ) { this = "JmsFlowTest" }
19
19
20
20
override string getARelevantTag ( ) { result = "tainted" }
21
21
22
22
override predicate hasActualResult ( Location location , string element , string tag , string value ) {
23
23
tag = "tainted" and
24
- exists ( DataFlow :: PathNode sink , TestConfig conf | conf . hasFlowPath ( _, sink ) |
24
+ exists ( TestFlow :: PathNode sink | TestFlow :: flowPath ( _, sink ) |
25
25
location = sink .getNode ( ) .getLocation ( ) and element = sink .getNode ( ) .toString ( ) and value = ""
26
26
)
27
27
}
You can’t perform that action at this time.
0 commit comments