add support for mz/fs and mz/child_process

This commit is contained in:
Erik Krogh Kristensen
2020-05-11 16:47:58 +02:00
parent bb8905b46e
commit a6cd91bb49

View File

@@ -442,10 +442,7 @@ module NodeJSLib {
private DataFlow::SourceNode fsModule(DataFlow::TypeTracker t) {
exists(string moduleName |
moduleName = "fs" or
moduleName = "graceful-fs" or
moduleName = "fs-extra" or
moduleName = "original-fs"
moduleName = ["mz/fs", "original-fs", "fs-extra", "graceful-fs", "fs"]
|
result = DataFlow::moduleImport(moduleName)
or
@@ -614,6 +611,8 @@ module NodeJSLib {
ChildProcessMethodCall() {
this = maybePromisified(DataFlow::moduleMember("child_process", methodName)).getACall()
or
this = DataFlow::moduleMember("mz/child_process", methodName).getACall()
}
private DataFlow::Node getACommandArgument(boolean shell) {