File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
csharp/ql/test/library-tests/frameworks/JsonNET 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 Configuration extends TaintTracking :: Configuration {
4- Configuration ( ) { this = "Json.NET test " }
3+ module TaintConfig implements DataFlow :: ConfigSig {
4+ predicate isSource ( DataFlow :: Node src ) { src . asExpr ( ) . ( StringLiteral ) . getValue ( ) = "tainted " }
55
6- override predicate isSource ( DataFlow:: Node src ) {
7- src .asExpr ( ) .( StringLiteral ) .getValue ( ) = "tainted"
8- }
9-
10- override predicate isSink ( DataFlow:: Node sink ) {
6+ predicate isSink ( DataFlow:: Node sink ) {
117 exists ( MethodCall c | c .getArgument ( 0 ) = sink .asExpr ( ) and c .getTarget ( ) .getName ( ) = "Sink" )
128 }
139}
1410
15- from Configuration c , DataFlow:: Node source , DataFlow:: Node sink
16- where c .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 source , sink
You can’t perform that action at this time.
0 commit comments