@@ -124,7 +124,7 @@ module TaintedPath {
124124 DataFlow:: Node output ;
125125
126126 NormalizingPathCall ( ) {
127- this = DataFlow :: moduleMember ( "path" , "normalize" ) .getACall ( ) and
127+ this = NodeJSLib :: Path :: moduleMember ( "normalize" ) .getACall ( ) and
128128 input = getArgument ( 0 ) and
129129 output = this
130130 }
@@ -148,7 +148,7 @@ module TaintedPath {
148148 DataFlow:: Node output ;
149149
150150 ResolvingPathCall ( ) {
151- this = DataFlow :: moduleMember ( "path" , "resolve" ) .getACall ( ) and
151+ this = NodeJSLib :: Path :: moduleMember ( "resolve" ) .getACall ( ) and
152152 input = getAnArgument ( ) and
153153 output = this
154154 or
@@ -180,7 +180,7 @@ module TaintedPath {
180180 DataFlow:: Node output ;
181181
182182 NormalizingRelativePathCall ( ) {
183- this = DataFlow :: moduleMember ( "path" , "relative" ) .getACall ( ) and
183+ this = NodeJSLib :: Path :: moduleMember ( "relative" ) .getACall ( ) and
184184 input = getAnArgument ( ) and
185185 output = this
186186 }
@@ -205,7 +205,7 @@ module TaintedPath {
205205
206206 PreservingPathCall ( ) {
207207 exists ( string name | name = "dirname" or name = "toNamespacedPath" |
208- this = DataFlow :: moduleMember ( "path" , name ) .getACall ( ) and
208+ this = NodeJSLib :: Path :: moduleMember ( name ) .getACall ( ) and
209209 input = getAnArgument ( ) and
210210 output = this
211211 )
@@ -244,7 +244,7 @@ module TaintedPath {
244244 // ".." + path.sep
245245 exists ( StringOps:: Concatenation conc | node = conc |
246246 conc .getOperand ( 0 ) .getStringValue ( ) = ".." and
247- conc .getOperand ( 1 ) .getALocalSource ( ) = DataFlow :: moduleMember ( "path" , "sep" ) and
247+ conc .getOperand ( 1 ) .getALocalSource ( ) = NodeJSLib :: Path :: moduleMember ( "sep" ) and
248248 conc .getNumOperand ( ) = 2
249249 )
250250 }
@@ -311,7 +311,7 @@ module TaintedPath {
311311
312312 IsAbsoluteSanitizer ( ) {
313313 exists ( DataFlow:: CallNode call | this = call |
314- call = DataFlow :: moduleMember ( "path" , "isAbsolute" ) .getACall ( ) and
314+ call = NodeJSLib :: Path :: moduleMember ( "isAbsolute" ) .getACall ( ) and
315315 operand = call .getArgument ( 0 ) and
316316 polarity = true and
317317 negatable = true
0 commit comments