File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
test/library-tests/dataflow/flowsources Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ private import internal.FlowSummaryImplSpecific
79
79
* ensuring that they are visible to the taint tracking / data flow library.
80
80
*/
81
81
private module Frameworks {
82
+ private import codeql.swift.frameworks.Alamofire.Alamofire
82
83
private import codeql.swift.frameworks.StandardLibrary.Collection
83
84
private import codeql.swift.frameworks.StandardLibrary.CustomUrlSchemes
84
85
private import codeql.swift.frameworks.StandardLibrary.Data
@@ -94,7 +95,7 @@ private module Frameworks {
94
95
private import codeql.swift.frameworks.StandardLibrary.Url
95
96
private import codeql.swift.frameworks.StandardLibrary.UrlSession
96
97
private import codeql.swift.frameworks.StandardLibrary.WebView
97
- private import codeql.swift.frameworks.Alamofire.Alamofire
98
+ private import codeql.swift.frameworks.UIKit.UITextField
98
99
private import codeql.swift.security.CleartextLoggingExtensions
99
100
private import codeql.swift.security.CleartextStorageDatabaseExtensions
100
101
private import codeql.swift.security.ECBEncryptionExtensions
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides models for the `UITextField` Swift class.
3
+ */
4
+
5
+ import swift
6
+ private import codeql.swift.dataflow.ExternalFlow
7
+
8
+ /**
9
+ * A model for `UITextField` members that are flow sources.
10
+ */
11
+ private class UITextFieldSource extends SourceModelCsv {
12
+ override predicate row ( string row ) {
13
+ row = [ ";UITextField;true;text;;;;local" , ";UITextField;true;attributedText;;;;local" ]
14
+ }
15
+ }
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ class UITextField: UIControl {
23
23
// --- tests ---
24
24
25
25
func testUITextField( textField: UITextField ) {
26
- _ = textField. text // $ MISSING: source=local
27
- _ = textField. attributedText // $ MISSING: source=local
26
+ _ = textField. text // $ source=local
27
+ _ = textField. attributedText // $ source=local
28
28
_ = textField. placeholder // GOOD (not input)
29
- _ = textField. text? . uppercased ( ) // $ MISSING: source=local
29
+ _ = textField. text? . uppercased ( ) // $ source=local
30
30
}
You can’t perform that action at this time.
0 commit comments