File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
swift/ql/lib/codeql/swift/frameworks/StandardLibrary Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides models for the `IteratorProtocol` Swift protocol.
3
+ */
4
+
5
+ private import codeql.swift.dataflow.ExternalFlow
6
+
7
+ /**
8
+ * A model for `IteratorProtocol` members that permit taint flow.
9
+ */
10
+ private class IteratorProtocolSummaries extends SummaryModelCsv {
11
+ override predicate row ( string row ) {
12
+ row =
13
+ [
14
+ ";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
15
+ ]
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ private class SequenceSummaries extends SummaryModelCsv {
29
29
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].ArrayElement;Argument[0].Parameter[0].CollectionElement;value" ,
30
30
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[-1].CollectionElement;Argument[0].Parameter[0].CollectionElement;value" ,
31
31
";Sequence;true;withContiguousStorageIfAvailable(_:);;;Argument[0].ReturnValue;ReturnValue.OptionalSome;value" ,
32
- ";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value" ,
33
- ";IteratorProtocol;true;next();;;Argument[-1].CollectionElement;ReturnValue.OptionalSome;value"
32
+ ";Sequence;true;makeIterator();;;Argument[-1].CollectionElement;ReturnValue.CollectionElement;value"
34
33
]
35
34
}
36
35
}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ private import Data
9
9
private import FileManager
10
10
private import FilePath
11
11
private import InputStream
12
+ private import IteratorProtocol
12
13
private import ManualMemoryManagement
13
14
private import NsData
14
15
private import NsObject
You can’t perform that action at this time.
0 commit comments