File tree Expand file tree Collapse file tree
swift/ql/lib/codeql/swift/frameworks/StandardLibrary Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 */
55
66import swift
7+ private import codeql.swift.dataflow.ExternalFlow
78
89/**
910 * A Swift unsafe typed pointer type such as `UnsafePointer`,
@@ -57,3 +58,16 @@ class CVaListPointerType extends NominalType {
5758class ManagedBufferPointerType extends BoundGenericType {
5859 ManagedBufferPointerType ( ) { this .getName ( ) .matches ( "ManagedBufferPointer<%" ) }
5960}
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
1212private import NsObject
1313private import NsString
1414private import NsUrl
15+ private import PointerTypes
1516private import Sequence
1617private import String
1718private import Url
You can’t perform that action at this time.
0 commit comments