File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,12 +68,6 @@ private class DefaultUrlRequest extends CustomUrlRequest {
6868 url = getArgument ( 0 )
6969 )
7070 or
71- (
72- ( moduleName = "http" or moduleName = "https" ) and
73- callee = DataFlow:: moduleMember ( moduleName , httpMethodName ( ) ) and
74- url = getArgument ( 0 )
75- )
76- or
7771 (
7872 moduleName = "got" and
7973 (
@@ -186,3 +180,26 @@ private class FetchUrlRequest extends CustomUrlRequest {
186180 }
187181
188182}
183+
184+
185+ /**
186+ * A model of a URL request in the Node.js `http` library.
187+ */
188+ private class NodeHttpUrlRequest extends CustomUrlRequest {
189+
190+ DataFlow:: Node url ;
191+
192+ NodeHttpUrlRequest ( ) {
193+ exists ( string moduleName , DataFlow:: SourceNode callee |
194+ this = callee .getACall ( ) |
195+ ( moduleName = "http" or moduleName = "https" ) and
196+ callee = DataFlow:: moduleMember ( moduleName , httpMethodName ( ) ) and
197+ url = getArgument ( 0 )
198+ )
199+ }
200+
201+ override DataFlow:: Node getUrl ( ) {
202+ result = url
203+ }
204+
205+ }
You can’t perform that action at this time.
0 commit comments