Skip to content

Commit eb401a2

Browse files
committed
Python: Fix test exclusion for stdlib Python 3.12
1 parent 5901478 commit eb401a2

File tree

3 files changed

+104
-98
lines changed

3 files changed

+104
-98
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@ module BombsConfig implements DataFlow::ConfigSig {
380380
predicate isSink(DataFlow::Node sink) { sink instanceof DecompressionBomb::Sink }
381381

382382
predicate isBarrierIn(DataFlow::Node node) {
383-
node.getScope().getEnclosingModule().getName() in ["tarfile", "zipfile"]
383+
node.getScope()
384+
.getEnclosingModule()
385+
.getFile()
386+
.getAbsolutePath()
387+
.matches(["%/tarfile.py", "%/zipfile.py", "%/zipfile/__init__.py"]) and
388+
node.getScope().getEnclosingModule().getFile().inStdlib()
384389
}
385390

386391
predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) {

0 commit comments

Comments
 (0)