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
22import semmle.code.java.dataflow.FlowSources
33import TestUtilities.InlineExpectationsTest
44
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 }
77
8- override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
9-
10- override predicate isSink ( DataFlow:: Node sink ) {
8+ predicate isSink ( DataFlow:: Node sink ) {
119 exists ( MethodAccess call |
1210 call .getMethod ( ) .hasName ( "sink" ) and call .getArgument ( 0 ) = sink .asExpr ( )
1311 )
1412 }
1513}
1614
15+ module TestFlow = TaintTracking:: Global< TestConfig > ;
16+
1717class JmsFlowTest extends InlineExpectationsTest {
1818 JmsFlowTest ( ) { this = "JmsFlowTest" }
1919
2020 override string getARelevantTag ( ) { result = "tainted" }
2121
2222 override predicate hasActualResult ( Location location , string element , string tag , string value ) {
2323 tag = "tainted" and
24- exists ( DataFlow :: PathNode sink , TestConfig conf | conf . hasFlowPath ( _, sink ) |
24+ exists ( TestFlow :: PathNode sink | TestFlow :: flowPath ( _, sink ) |
2525 location = sink .getNode ( ) .getLocation ( ) and element = sink .getNode ( ) .toString ( ) and value = ""
2626 )
2727 }
You can’t perform that action at this time.
0 commit comments