File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
java/ql/test/library-tests/frameworks/ratpack Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,28 +3,28 @@ import semmle.code.java.dataflow.TaintTracking
3
3
import semmle.code.java.dataflow.FlowSources
4
4
import TestUtilities.InlineExpectationsTest
5
5
6
- class Conf extends TaintTracking:: Configuration {
7
- Conf ( ) { this = "qltest:frameworks:ratpack" }
8
-
9
- override predicate isSource ( DataFlow:: Node n ) {
6
+ module Config implements DataFlow:: ConfigSig {
7
+ predicate isSource ( DataFlow:: Node n ) {
10
8
n .asExpr ( ) .( MethodAccess ) .getMethod ( ) .hasName ( "taint" )
11
9
or
12
10
n instanceof RemoteFlowSource
13
11
}
14
12
15
- override predicate isSink ( DataFlow:: Node n ) {
13
+ predicate isSink ( DataFlow:: Node n ) {
16
14
exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( "sink" ) | n .asExpr ( ) = ma .getAnArgument ( ) )
17
15
}
18
16
}
19
17
18
+ module Flow = TaintTracking:: Global< Config > ;
19
+
20
20
class HasFlowTest extends InlineExpectationsTest {
21
21
HasFlowTest ( ) { this = "HasFlowTest" }
22
22
23
23
override string getARelevantTag ( ) { result = "hasTaintFlow" }
24
24
25
25
override predicate hasActualResult ( Location location , string element , string tag , string value ) {
26
26
tag = "hasTaintFlow" and
27
- exists ( DataFlow:: Node sink , Conf conf | conf . hasFlowTo ( sink ) |
27
+ exists ( DataFlow:: Node sink | Flow :: flowTo ( sink ) |
28
28
sink .getLocation ( ) = location and
29
29
element = sink .toString ( ) and
30
30
value = ""
You can’t perform that action at this time.
0 commit comments