Skip to content

Commit 230f78a

Browse files
committed
JS: Step through path.{format, parse}
1 parent 86b23b2 commit 230f78a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

javascript/ql/src/semmle/javascript/security/dataflow/TaintedPathCustomizations.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,9 @@ module TaintedPath {
212212
DataFlow::Node output;
213213

214214
PreservingPathCall() {
215-
exists(string name | name = "dirname" or name = "toNamespacedPath" |
216-
this = NodeJSLib::Path::moduleMember(name).getACall() and
217-
input = getAnArgument() and
218-
output = this
219-
)
215+
this = NodeJSLib::Path::moduleMember(["dirname", "toNamespacedPath", "parse", "format"]).getACall() and
216+
input = getAnArgument() and
217+
output = this
220218
or
221219
// non-global replace or replace of something other than /\.\./g, /[/]/g, or /[\.]/g.
222220
this.getCalleeName() = "replace" and

0 commit comments

Comments
 (0)