mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
add support for util.promisify with child_process calls
This commit is contained in:
@@ -594,6 +594,14 @@ module NodeJSLib {
|
||||
|
||||
ChildProcessMethodCall() {
|
||||
this = DataFlow::moduleMember("child_process", methodName).getACall()
|
||||
or
|
||||
exists(DataFlow::CallNode promisify |
|
||||
promisify = DataFlow::moduleMember("util", "promisify").getACall()
|
||||
|
|
||||
this = promisify.getACall() and
|
||||
promisify.getArgument(0).getALocalSource() =
|
||||
DataFlow::moduleMember("child_process", methodName)
|
||||
)
|
||||
}
|
||||
|
||||
private DataFlow::Node getACommandArgument(boolean shell) {
|
||||
|
||||
Reference in New Issue
Block a user