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
7979 * ensuring that they are visible to the taint tracking / data flow library.
8080 */
8181private module Frameworks {
82+ private import codeql.swift.frameworks.Alamofire.Alamofire
8283 private import codeql.swift.frameworks.StandardLibrary.Collection
8384 private import codeql.swift.frameworks.StandardLibrary.CustomUrlSchemes
8485 private import codeql.swift.frameworks.StandardLibrary.Data
@@ -94,7 +95,7 @@ private module Frameworks {
9495 private import codeql.swift.frameworks.StandardLibrary.Url
9596 private import codeql.swift.frameworks.StandardLibrary.UrlSession
9697 private import codeql.swift.frameworks.StandardLibrary.WebView
97- private import codeql.swift.frameworks.Alamofire.Alamofire
98+ private import codeql.swift.frameworks.UIKit.UITextField
9899 private import codeql.swift.security.CleartextLoggingExtensions
99100 private import codeql.swift.security.CleartextStorageDatabaseExtensions
100101 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 {
2323// --- tests ---
2424
2525func 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
2828 _ = textField. placeholder // GOOD (not input)
29- _ = textField. text? . uppercased ( ) // $ MISSING: source=local
29+ _ = textField. text? . uppercased ( ) // $ source=local
3030}
You can’t perform that action at this time.
0 commit comments