File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
swift/ql/lib/codeql/swift/frameworks/StandardLibrary Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
import swift
7
+ private import codeql.swift.dataflow.ExternalFlow
7
8
8
9
/**
9
10
* A Swift unsafe typed pointer type such as `UnsafePointer`,
@@ -57,3 +58,16 @@ class CVaListPointerType extends NominalType {
57
58
class ManagedBufferPointerType extends BoundGenericType {
58
59
ManagedBufferPointerType ( ) { this .getName ( ) .matches ( "ManagedBufferPointer<%" ) }
59
60
}
61
+
62
+
63
+ /**
64
+ * A model for pointer members that permit taint flow.
65
+ */
66
+ private class PointerSummaries extends SummaryModelCsv {
67
+ override predicate row ( string row ) {
68
+ row =
69
+ [
70
+ ";UnsafeMutablePointer;true;init(mutating:);;;Argument[0];ReturnValue;taint" ,
71
+ ]
72
+ }
73
+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ private import NsData
12
12
private import NsObject
13
13
private import NsString
14
14
private import NsUrl
15
+ private import PointerTypes
15
16
private import Sequence
16
17
private import String
17
18
private import Url
You can’t perform that action at this time.
0 commit comments