@@ -5,20 +5,14 @@ import semmle.code.java.security.XSS
55import semmle.code.java.security.UrlRedirect
66import TestUtilities.InlineFlowTest
77
8- class EnableLegacy extends EnableLegacyConfiguration {
9- EnableLegacy ( ) { exists ( this ) }
10- }
11-
12- class Conf extends TaintTracking:: Configuration {
13- Conf ( ) { this = "qltest:frameworks:apache-http" }
14-
15- override predicate isSource ( DataFlow:: Node n ) {
8+ module Config implements DataFlow:: ConfigSig {
9+ predicate isSource ( DataFlow:: Node n ) {
1610 n .asExpr ( ) .( MethodAccess ) .getMethod ( ) .hasName ( "taint" )
1711 or
1812 n instanceof RemoteFlowSource
1913 }
2014
21- override predicate isSink ( DataFlow:: Node n ) {
15+ predicate isSink ( DataFlow:: Node n ) {
2216 exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( "sink" ) | n .asExpr ( ) = ma .getAnArgument ( ) )
2317 or
2418 n instanceof XssSink
@@ -27,8 +21,10 @@ class Conf extends TaintTracking::Configuration {
2721 }
2822}
2923
24+ module Flow = TaintTracking:: Global< Config > ;
25+
3026class HasFlowTest extends InlineFlowTest {
31- override DataFlow:: Configuration getValueFlowConfig ( ) { none ( ) }
27+ override predicate hasValueFlow ( DataFlow:: Node src , DataFlow :: Node sink ) { none ( ) }
3228
33- override DataFlow:: Configuration getTaintFlowConfig ( ) { result = any ( Conf c ) }
29+ override predicate hasTaintFlow ( DataFlow:: Node src , DataFlow :: Node sink ) { Flow :: flow ( src , sink ) }
3430}
0 commit comments