mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Improve ZipSlip exclusion to take varargs into account
This commit is contained in:
@@ -54,7 +54,10 @@ private class FileCreationSink extends DataFlow::Node {
|
||||
*/
|
||||
private predicate isPathCreation(DataFlow::Node sink) {
|
||||
exists(PathCreation pc |
|
||||
pc.getAnInput() = sink.asExpr() and
|
||||
pc.getAnInput() = sink.asExpr()
|
||||
or
|
||||
pc.getAnInput().(Argument).isVararg() and sink.(DataFlow::ImplicitVarargsArray).getCall() = pc
|
||||
|
|
||||
// exclude actual read/write operations included in `PathCreation`
|
||||
not pc.(Call)
|
||||
.getCallee()
|
||||
|
||||
Reference in New Issue
Block a user