mirror of
https://github.com/github/codeql.git
synced 2026-05-11 17:59:29 +02:00
JS: Use type info in mongodb/mongoose model
This commit is contained in:
@@ -77,6 +77,18 @@ private module MongoDB {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection based on the type `mongodb.Collection`.
|
||||
*
|
||||
* Note that this also covers `mongoose` models since they are subtypes
|
||||
* of `mongodb.Collection`.
|
||||
*/
|
||||
private class CollectionFromType extends Collection {
|
||||
CollectionFromType() {
|
||||
hasUnderlyingType("mongodb", "Collection")
|
||||
}
|
||||
}
|
||||
|
||||
/** Gets a data flow node referring to a MongoDB collection. */
|
||||
private DataFlow::SourceNode getACollection(DataFlow::TypeTracker t) {
|
||||
t.start() and
|
||||
|
||||
Reference in New Issue
Block a user