mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JavaScript: Address review comments.
This commit is contained in:
@@ -703,7 +703,7 @@ module API {
|
||||
boundArgs = 0
|
||||
or
|
||||
exists(DataFlow::CallNode promisify |
|
||||
promisify = API::moduleImport(["util", "bluebird"]).getMember("promisify").getACall()
|
||||
promisify = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify")
|
||||
|
|
||||
trackUseNode(nd, false, boundArgs, t.continue()).flowsTo(promisify.getArgument(0)) and
|
||||
promisified = true and
|
||||
@@ -713,7 +713,7 @@ module API {
|
||||
exists(DataFlow::PartialInvokeNode pin, DataFlow::Node pred, int predBoundArgs |
|
||||
trackUseNode(nd, promisified, predBoundArgs, t.continue()).flowsTo(pred) and
|
||||
result = pin.getBoundFunction(pred, boundArgs - predBoundArgs) and
|
||||
boundArgs <= 10
|
||||
boundArgs in [0 .. 10]
|
||||
)
|
||||
or
|
||||
exists(StepSummary summary |
|
||||
@@ -779,7 +779,8 @@ module API {
|
||||
|
||||
private DataFlow::SourceNode awaited(DataFlow::InvokeNode call, DataFlow::TypeTracker t) {
|
||||
t.startInPromise() and
|
||||
exists(MkSyntheticCallbackArg(_, _, call))
|
||||
exists(MkSyntheticCallbackArg(_, _, call)) and
|
||||
result = call
|
||||
or
|
||||
exists(DataFlow::TypeTracker t2 | result = awaited(call, t2).track(t2, t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user