File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
java/ql/test/query-tests/security/CWE-089/semmle/examples Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import semmle.code.java.dataflow.FlowSources
2
2
3
- class Conf extends TaintTracking :: Configuration {
4
- Conf ( ) { this = "qltest:cwe-089:taintedString" }
3
+ module Config implements DataFlow :: ConfigSig {
4
+ predicate isSource ( DataFlow :: Node source ) { source instanceof UserInput }
5
5
6
- override predicate isSource ( DataFlow:: Node source ) { source instanceof UserInput }
7
-
8
- override predicate isSink ( DataFlow:: Node sink ) { any ( ) }
6
+ predicate isSink ( DataFlow:: Node sink ) { any ( ) }
9
7
}
10
8
11
- from Conf conf , Expr tainted , Method method
9
+ module Flow = TaintTracking:: Global< Config > ;
10
+
11
+ from Expr tainted , Method method
12
12
where
13
- conf . hasFlowToExpr ( tainted ) and
13
+ Flow :: flowToExpr ( tainted ) and
14
14
tainted .getEnclosingCallable ( ) = method and
15
15
tainted .getFile ( ) .getStem ( ) = [ "Test" , "Validation" ]
16
16
select method , tainted .getLocation ( ) .getStartLine ( ) - method .getLocation ( ) .getStartLine ( ) , tainted
You can’t perform that action at this time.
0 commit comments