Skip to content

Commit 0ce2ced

Browse files
committed
Python: Model pymongo.mongo_client.MongoClient
1 parent 81fdc1b commit 0ce2ced

File tree

1 file changed

+4
-0
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+4
-0
lines changed

python/ql/src/experimental/semmle/python/frameworks/NoSQL.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ private module NoSql {
1515
/** Gets a reference to `pymongo.MongoClient` */
1616
private API::Node pyMongo() {
1717
result = API::moduleImport("pymongo").getMember("MongoClient").getReturn()
18+
or
19+
// see https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html#pymongo.mongo_client.MongoClient
20+
result =
21+
API::moduleImport("pymongo").getMember("mongo_client").getMember("MongoClient").getReturn()
1822
}
1923

2024
/** Gets a reference to `flask_pymongo.PyMongo` */

0 commit comments

Comments
 (0)