Skip to content

Commit d8fd457

Browse files
committed
Python: Use helper predicate
Since the helper predicate had nice qldocs
1 parent e7772f1 commit d8fd457

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

python/ql/src/experimental/semmle/python/security/DecompressionBomb.qll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,7 @@ module ZipFile {
5454
exists(API::Node zipOpen | zipOpen = zipFileClass().getReturn().getMember("open") |
5555
// this open function must reads uncompressed data with buffer
5656
// and checks the accumulated size at the end of each read to be called safe
57-
not TaintTracking::localExprTaint(zipOpen
58-
.getReturn()
59-
.getMember("read")
60-
.getParameter(0)
61-
.asSink()
62-
.asExpr(), any(Compare i).getASubExpression*()) and
57+
not zipFileDecompressionBombSanitizer(zipOpen) and
6358
this = zipOpen.getACall()
6459
)
6560
}

0 commit comments

Comments
 (0)