File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -454,3 +454,27 @@ private module SpannerCsv {
454
454
}
455
455
}
456
456
}
457
+
458
+ /**
459
+ * Provides classes modeling the `tedious` package.
460
+ */
461
+ private module Tedious {
462
+ API:: Node tedious ( ) { result = API:: moduleImport ( "tedious" ) }
463
+
464
+ class QueryCall extends DatabaseAccess , API:: CallNode {
465
+ QueryCall ( ) {
466
+ this = tedious ( ) .getMember ( "Connection" ) .getInstance ( ) .getMember ( "execSql" ) .getACall ( )
467
+ }
468
+ override DataFlow:: Node getAQueryArgument ( ) {
469
+ exists ( API:: NewNode request |
470
+ request = tedious ( ) .getMember ( "Request" ) .getAnInstantiation ( ) and
471
+ this .getParameter ( 0 ) .asSink ( ) = request .getReturn ( ) .getAValueReachableFromSource ( ) and
472
+ result = request .getArgument ( 0 )
473
+ )
474
+ }
475
+ }
476
+
477
+ class QueryString extends SQL:: SqlString {
478
+ QueryString ( ) { this = any ( QueryCall qc ) .getAQueryArgument ( ) }
479
+ }
480
+ }
You can’t perform that action at this time.
0 commit comments