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 11import javascript
22
3- class CommandLineFileNameConfiguration extends TaintTracking:: Configuration {
4- CommandLineFileNameConfiguration ( ) { this = "CommandLineFileNameConfiguration" }
5-
6- override predicate isSource ( DataFlow:: Node source ) {
3+ module CommandLineFileNameConfig implements DataFlow:: ConfigSig {
4+ predicate isSource ( DataFlow:: Node source ) {
75 DataFlow:: globalVarRef ( "process" ) .getAPropertyRead ( "argv" ) .getAPropertyRead ( ) = source
86 }
97
10- override predicate isSink ( DataFlow:: Node sink ) {
8+ predicate isSink ( DataFlow:: Node sink ) {
119 DataFlow:: moduleMember ( "fs" , "readFile" ) .getACall ( ) .getArgument ( 0 ) = sink
1210 }
1311}
1412
15- from CommandLineFileNameConfiguration cfg , DataFlow:: Node source , DataFlow:: Node sink
16- where cfg .hasFlow ( source , sink )
13+ module CommandLineFileNameFlow = TaintTracking:: Global< CommandLineFileNameConfig > ;
14+
15+ from DataFlow:: Node source , DataFlow:: Node sink
16+ where CommandLineFileNameFlow:: flow ( source , sink )
1717select source , sink
You can’t perform that action at this time.
0 commit comments