Skip to content

Commit 06edd07

Browse files
committed
Python: Enable taint when iterating over ExternalFileObject
1 parent 86630f1 commit 06edd07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/ql/src/semmle/python/security/strings/External.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ class ExternalFileObject extends TaintKind {
195195
or
196196
name = "readlines" and result.(SequenceKind).getItem() = this.getValue()
197197
}
198+
199+
override TaintKind getTaintForIteration() { result = this.getValue() }
198200
}
199201

200202
/**

0 commit comments

Comments
 (0)