Skip to content

Commit 91f43a7

Browse files
committed
JS: address review comments
1 parent 7722d77 commit 91f43a7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • javascript/ql/src/semmle/javascript/frameworks

javascript/ql/src/semmle/javascript/frameworks/NoSQL.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,13 @@ private module Minimongo {
756756
exists(DataFlow::TypeTracker t2 | result = getACollection(t2).track(t2, t))
757757
}
758758

759+
/**
760+
* Provides signatures for the Collection methods.
761+
*/
759762
module CollectionMethodSignatures {
763+
/**
764+
* Holds if Collection method `name` interprets parameter `n` as a query.
765+
*/
760766
predicate interpretsArgumentAsQuery(string m, int queryArgIdx) {
761767
// implements most of the MongoDB interface
762768
MongoDB::CollectionMethodSignatures::interpretsArgumentAsQuery(m, queryArgIdx)
@@ -806,7 +812,7 @@ private module MarsDB {
806812
/** Gets a data flow node referring to a MarsDB collection. */
807813
private DataFlow::SourceNode getACollection(DataFlow::TypeTracker t) {
808814
t.start() and
809-
// new Collection(...)
815+
// [new] Collection(...)
810816
result = getADb(DataFlow::TypeTracker::end()).getAPropertyRead("Collection").getAnInvocation()
811817
or
812818
exists(DataFlow::TypeTracker t2 | result = getACollection(t2).track(t2, t))

0 commit comments

Comments
 (0)