Skip to content

Commit b8c96ed

Browse files
committed
Swift: Delete some TODO comments (that have been turned into issues).
1 parent e9c2594 commit b8c96ed

File tree

7 files changed

+6
-8
lines changed

7 files changed

+6
-8
lines changed

swift/ql/lib/codeql/swift/elements/decl/PrecedenceGroupDecl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ private import codeql.swift.generated.decl.PrecedenceGroupDecl
22

33
class PrecedenceGroupDecl extends Generated::PrecedenceGroupDecl {
44
override string toString() {
5-
result = "precedencegroup ..." // TODO: Once we extract the name we can improve this.
5+
result = "precedencegroup ..."
66
}
77
}

swift/ql/lib/codeql/swift/elements/expr/TupleElementExpr.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ private import codeql.swift.generated.expr.TupleElementExpr
22

33
class TupleElementExpr extends Generated::TupleElementExpr {
44
override string toString() {
5-
result = "." + this.getIndex() // TODO: Can be improved once we extract the name
5+
result = "." + this.getIndex()
66
}
77
}

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/FilePath.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class FilePath extends StructDecl {
1515
*/
1616
private class FilePathSummaries extends SummaryModelCsv {
1717
override predicate row(string row) {
18-
// TODO: Properly model this class
1918
row = ";FilePath;true;init(stringLiteral:);(String);;Argument[0];ReturnValue;taint"
2019
}
2120
}

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/NsUrl.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ private import codeql.swift.dataflow.ExternalFlow
1010
*/
1111
private class NsUrlSummaries extends SummaryModelCsv {
1212
override predicate row(string row) {
13-
// TODO: Properly model this class
1413
row = ";NSURL;true;init(string:);(String);;Argument[0];ReturnValue;taint"
1514
}
1615
}

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/WebView.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ private class JsValueSummaries extends SummaryModelCsv {
138138
";JSValue;true;toRange();;;Argument[-1];ReturnValue;taint",
139139
";JSValue;true;toRect();;;Argument[-1];ReturnValue;taint",
140140
";JSValue;true;toSize();;;Argument[-1];ReturnValue;taint",
141-
// TODO: These models could use content flow to be more precise
142141
";JSValue;true;atIndex(_:);;;Argument[-1];ReturnValue;taint",
143142
";JSValue;true;defineProperty(_:descriptor:);;;Argument[1];Argument[-1];taint",
144143
";JSValue;true;forProperty(_:);;;Argument[-1];ReturnValue;taint",

swift/ql/lib/codeql/swift/security/CleartextStoragePreferencesExtensions.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ private class NSUbiquitousKeyValueStore extends CleartextStoragePreferencesSink
6363
* A more complicated case, this is a macOS-only way of writing to
6464
* NSUserDefaults by modifying the `NSUserDefaultsController.values: Any`
6565
* object via reflection (`perform(Selector)`) or the `NSKeyValueCoding`,
66-
* `NSKeyValueBindingCreation` APIs. (TODO)
66+
* `NSKeyValueBindingCreation` APIs.
6767
*/
6868
private class NSUserDefaultsControllerStore extends CleartextStoragePreferencesSink {
69-
NSUserDefaultsControllerStore() { none() }
69+
NSUserDefaultsControllerStore() {
70+
none() // not yet implemented
71+
}
7072

7173
override string getStoreName() { result = "the user defaults database" }
7274
}

swift/ql/lib/codeql/swift/security/PathInjectionExtensions.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ private class DefaultPathInjectionSink extends PathInjectionSink {
3939
private class DefaultPathInjectionSanitizer extends PathInjectionSanitizer {
4040
DefaultPathInjectionSanitizer() {
4141
// This is a simplified implementation.
42-
// TODO: Implement a complete path sanitizer when Guards are available.
4342
exists(CallExpr starts, CallExpr normalize, DataFlow::Node validated |
4443
starts.getStaticTarget().getName() = "starts(with:)" and
4544
starts.getStaticTarget().getEnclosingDecl() instanceof FilePath and

0 commit comments

Comments
 (0)