We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d67526 commit 6d2bffeCopy full SHA for 6d2bffe
javascript/ql/src/semmle/javascript/security/dataflow/ZipSlipCustomizations.qll
@@ -108,6 +108,13 @@ module ZipSlip {
108
// to be a zipslip vulnerability since it may truncate an
109
// existing file.
110
this = NodeJSLib::Fs::moduleMember("createWriteStream").getACall().getArgument(0)
111
+ or
112
+ // Not covered by `FileSystemWriteSink` because a later call
113
+ // to `fs.write` is required for a write to take place.
114
+ exists(DataFlow::CallNode call | this = call.getArgument(0) |
115
+ call = NodeJSLib::Fs::moduleMember(["open", "openSync"]).getACall() and
116
+ call.getArgument(1).getStringValue().regexpMatch("(?i)w.{0,2}")
117
+ )
118
}
119
120
0 commit comments