mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: support optional options argument to MongoClient.connect
This commit is contained in:
@@ -44,7 +44,7 @@ private module MongoDB {
|
||||
/** Gets a data flow node that leads to a `connect` callback. */
|
||||
private DataFlow::SourceNode getAMongoDbCallback(DataFlow::TypeBackTracker t) {
|
||||
t.start() and
|
||||
result = getAMongoClient().getAMemberCall("connect").getArgument(1).getALocalSource()
|
||||
result = getAMongoClient().getAMemberCall("connect").getLastArgument().getALocalSource()
|
||||
or
|
||||
exists(DataFlow::TypeBackTracker t2 | result = getAMongoDbCallback(t2).backtrack(t2, t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user