@@ -378,6 +378,68 @@ module SqlExecution {
378378 }
379379}
380380
381+ /** Provides a class for modeling NoSQL execution APIs. */
382+ module NoSqlExecution {
383+ /**
384+ * A data-flow node that executes NoSQL queries.
385+ *
386+ * Extend this class to model new APIs. If you want to refine existing API models,
387+ * extend `NoSqlExecution` instead.
388+ */
389+ abstract class Range extends DataFlow:: Node {
390+ /** Gets the argument that specifies the NoSQL query to be executed. */
391+ abstract DataFlow:: Node getQuery ( ) ;
392+
393+ /** Holds if this query will unpack/interpret a dictionary */
394+ abstract predicate interpretsDict ( ) ;
395+
396+ /** Holds if this query can be dangerous when run on a user-controlled string */
397+ abstract predicate vulnerableToStrings ( ) ;
398+ }
399+ }
400+
401+ /**
402+ * A data-flow node that executes NoSQL queries.
403+ *
404+ * Extend this class to refine existing API models. If you want to model new APIs,
405+ * extend `NoSqlExecution::Range` instead.
406+ */
407+ class NoSqlExecution extends DataFlow:: Node instanceof NoSqlExecution:: Range {
408+ /** Gets the argument that specifies the NoSQL query to be executed. */
409+ DataFlow:: Node getQuery ( ) { result = super .getQuery ( ) }
410+
411+ /** Holds if this query will unpack/interpret a dictionary */
412+ predicate interpretsDict ( ) { super .interpretsDict ( ) }
413+
414+ /** Holds if this query can be dangerous when run on a user-controlled string */
415+ predicate vulnerableToStrings ( ) { super .vulnerableToStrings ( ) }
416+ }
417+
418+ /** Provides classes for modeling NoSql sanitization-related APIs. */
419+ module NoSqlSanitizer {
420+ /**
421+ * A data-flow node that collects functions sanitizing NoSQL queries.
422+ *
423+ * Extend this class to model new APIs. If you want to refine existing API models,
424+ * extend `NoSQLSanitizer` instead.
425+ */
426+ abstract class Range extends DataFlow:: Node {
427+ /** Gets the argument that specifies the NoSql query to be sanitized. */
428+ abstract DataFlow:: Node getAnInput ( ) ;
429+ }
430+ }
431+
432+ /**
433+ * A data-flow node that collects functions sanitizing NoSQL queries.
434+ *
435+ * Extend this class to model new APIs. If you want to refine existing API models,
436+ * extend `NoSQLSanitizer::Range` instead.
437+ */
438+ class NoSqlSanitizer extends DataFlow:: Node instanceof NoSqlSanitizer:: Range {
439+ /** Gets the argument that specifies the NoSql query to be sanitized. */
440+ DataFlow:: Node getAnInput ( ) { result = super .getAnInput ( ) }
441+ }
442+
381443/**
382444 * A data-flow node that executes a regular expression.
383445 *
0 commit comments