File tree Expand file tree Collapse file tree
javascript/ql/test/query-tests/Security/CWE-078/UnsafeShellCommandConstruction/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11var cp = require ( "child_process" )
22
3- module . exports = function ( name ) {
3+ module . exports . blah = function ( name ) {
44 cp . exec ( "rm -rf " + name ) ; // $ Alert
55
66 cp . execFile ( name , [ name ] ) ;
@@ -19,7 +19,7 @@ function cla() { }
1919cla . prototype . method = function ( name ) {
2020 cp . exec ( "rm -rf " + name ) ; // $ Alert
2121}
22- module . exports = new cla ( ) ;
22+ module . exports . cla = new cla ( ) ;
2323
2424
2525function cla2 ( ) { }
@@ -474,7 +474,7 @@ const {promisify} = require('util');
474474
475475const exec = promisify ( require ( 'child_process' ) . exec ) ;
476476
477- module . exports = function check ( config ) {
477+ module . exports . check = function check ( config ) {
478478 const cmd = path . join ( config . installedPath , 'myBinary -v' ) ; // $ Alert
479479 return exec ( cmd ) ;
480480}
You can’t perform that action at this time.
0 commit comments