Add check for mongoengine raw queries

After initial research on our end, we believe that the only vulnerability within the objects() method is passing a query into the __raw__ keyword argument. More info can be found below:

http://docs.mongoengine.org/guide/querying.html?highlight=inc__#raw-queries
This commit is contained in:
thank_you
2021-04-05 20:44:16 -04:00
parent 759fa2cd01
commit 6ade120983

View File

@@ -63,7 +63,7 @@ private module NoSQL {
.getACall()
}
override DataFlow::Node getQueryNode() { result = this.getArg(0) }
override DataFlow::Node getQueryNode() { result = this.getArgByName("__raw__") }
}
private class MongoSanitizerCall extends DataFlow::CallCfgNode, NoSQLSanitizer::Range {