Skip to content

Commit e58e9a2

Browse files
committed
Python: mongoClientInstance refactoring
1 parent 0ce2ced commit e58e9a2

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private module NoSql {
3838
* Gets a reference to an initialized `Mongo` instance.
3939
* See `pyMongo()`, `flask_PyMongo()`
4040
*/
41-
private API::Node mongoInstance() {
41+
private API::Node mongoClientInstance() {
4242
result = pyMongo() or
4343
result = flask_PyMongo()
4444
}
@@ -56,17 +56,17 @@ private module NoSql {
5656
/**
5757
* Gets a reference to a `Mongo` DB use.
5858
*
59-
* See `mongoInstance()`, `mongoDBInstance()`.
59+
* See `mongoClientInstance()`, `mongoDBInstance()`.
6060
*/
6161
private DataFlow::LocalSourceNode mongoDB(DataFlow::TypeTracker t) {
6262
t.start() and
6363
(
6464
exists(SubscriptNode subscript |
65-
subscript.getObject() = mongoInstance().getAUse().asCfgNode() and
65+
subscript.getObject() = mongoClientInstance().getAUse().asCfgNode() and
6666
result.asCfgNode() = subscript
6767
)
6868
or
69-
result.(DataFlow::AttrRead).getObject() = mongoInstance().getAUse()
69+
result.(DataFlow::AttrRead).getObject() = mongoClientInstance().getAUse()
7070
or
7171
result = mongoDBInstance().getAUse()
7272
)

0 commit comments

Comments
 (0)