File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
javascript/ql/test/tutorials/Analyzing data flow in JavaScript/Global data flow Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,18 @@ class StepThroughResolveSymlinks extends TaintTracking::SharedTaintStep {
1010 }
1111}
1212
13- class CommandLineFileNameConfiguration extends TaintTracking:: Configuration {
14- CommandLineFileNameConfiguration ( ) { this = "CommandLineFileNameConfiguration" }
15-
16- override predicate isSource ( DataFlow:: Node source ) {
13+ module CommandLineFileNameConfig implements DataFlow:: ConfigSig {
14+ predicate isSource ( DataFlow:: Node source ) {
1715 DataFlow:: globalVarRef ( "process" ) .getAPropertyRead ( "argv" ) .getAPropertyRead ( ) = source
1816 }
1917
20- override predicate isSink ( DataFlow:: Node sink ) {
18+ predicate isSink ( DataFlow:: Node sink ) {
2119 DataFlow:: moduleMember ( "fs" , "readFile" ) .getACall ( ) .getArgument ( 0 ) = sink
2220 }
2321}
2422
25- from CommandLineFileNameConfiguration cfg , DataFlow:: Node source , DataFlow:: Node sink
26- where cfg .hasFlow ( source , sink )
23+ module CommandLineFileNameFlow = TaintTracking:: Global< CommandLineFileNameConfig > ;
24+
25+ from DataFlow:: Node source , DataFlow:: Node sink
26+ where CommandLineFileNameFlow:: flow ( source , sink )
2727select source , sink
You can’t perform that action at this time.
0 commit comments