File tree Expand file tree Collapse file tree
java/ql/test/query-tests/security/CWE-089/semmle/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import semmle.code.java.dataflow.FlowSources
22
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 }
55
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 ( ) }
97}
108
11- from Conf conf , Expr tainted , Method method
9+ module Flow = TaintTracking:: Global< Config > ;
10+
11+ from Expr tainted , Method method
1212where
13- conf . hasFlowToExpr ( tainted ) and
13+ Flow :: flowToExpr ( tainted ) and
1414 tainted .getEnclosingCallable ( ) = method and
1515 tainted .getFile ( ) .getStem ( ) = [ "Test" , "Validation" ]
1616select method , tainted .getLocation ( ) .getStartLine ( ) - method .getLocation ( ) .getStartLine ( ) , tainted
You can’t perform that action at this time.
0 commit comments