File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
csharp/ql/test/library-tests/frameworks/NHibernate Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 11import csharp
22
3- class MyConfiguration extends TaintTracking :: Configuration {
4- MyConfiguration ( ) { this = "MyConfiguration " }
3+ module TaintConfig implements DataFlow :: ConfigSig {
4+ predicate isSource ( DataFlow :: Node node ) { node . asExpr ( ) . ( StringLiteral ) . getValue ( ) = "tainted " }
55
6- override predicate isSource ( DataFlow:: Node node ) {
7- node .asExpr ( ) .( StringLiteral ) .getValue ( ) = "tainted"
8- }
9-
10- override predicate isSink ( DataFlow:: Node node ) {
6+ predicate isSink ( DataFlow:: Node node ) {
117 exists ( MethodCall mc | mc .getTarget ( ) .hasName ( "Sink" ) and node .asExpr ( ) = mc .getArgument ( 0 ) )
128 }
139}
1410
15- from MyConfiguration config , DataFlow:: Node source , DataFlow:: Node sink
16- where config .hasFlow ( source , sink )
11+ module Taint = TaintTracking:: Global< TaintConfig > ;
12+
13+ from DataFlow:: Node source , DataFlow:: Node sink
14+ where Taint:: flow ( source , sink )
1715select sink , "Data flow from $@." , source , source .toString ( )
You can’t perform that action at this time.
0 commit comments