From 8f292d439b47a831b0e44c16a759465c78774b02 Mon Sep 17 00:00:00 2001 From: Asger F Date: Tue, 24 Nov 2026 13:23:40 +0100 Subject: [PATCH 1/2] Unified: Support optional parameters in legacy MaD signatures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../codeql/unified/internal/mad/LegacyMaD.qll | 182 +++++++++++++++--- .../ql/test/library-tests/mad/test.expected | 10 + .../ql/test/library-tests/mad/test.ext.json | 10 +- unified/ql/test/library-tests/mad/test.swift | 41 ++++ 4 files changed, 210 insertions(+), 33 deletions(-) diff --git a/unified/ql/lib/codeql/unified/internal/mad/LegacyMaD.qll b/unified/ql/lib/codeql/unified/internal/mad/LegacyMaD.qll index 92d68e6315b2..2995b59dd57e 100644 --- a/unified/ql/lib/codeql/unified/internal/mad/LegacyMaD.qll +++ b/unified/ql/lib/codeql/unified/internal/mad/LegacyMaD.qll @@ -56,18 +56,41 @@ private string getQualifiedNameFromExpr(Expr e) { ) } +/** Holds if the argument at `index` of `call` has the given `label`, or `_` if positional. */ +private predicate callArgLabel(CallExpr call, int index, string label) { + exists(Argument arg | + arg = call.getAnArgument() and + index = arg.getParentIndex() + | + arg.isPositional() and + label = "_" + or + label = arg.getName() + ) +} + private string getArgLabelsFromCall(CallExpr call) { result = - concat(Argument arg, string name | - arg = call.getAnArgument() and - ( - arg.isPositional() and - name = "_" - or - name = arg.getName() - ) + concat(int index, string label | callArgLabel(call, index, label) | label + ":" order by index) +} + +/** + * Gets the labels used to join `call` with selectors that have the method name `name`. + * + * This consists of the named argument labels, ignoring positional arguments and labels that are + * optional for some selector with the same method name. Since this discards some information, + * the full argument labels are checked after the join. + */ +bindingset[name] +pragma[inline_late] +private string getJoinLabelsFromCall(CallExpr call, string name) { + result = + concat(int index, string label | + callArgLabel(call, index, label) and + label != "_" and + not optionalArgLabel(name, label) | - name + ":" order by arg.getParentIndex() + label + ":" order by index ) } @@ -78,22 +101,29 @@ private string getArgLabelsFromCall(CallExpr call) { * argument named `#newValue`, so models refer to it as e.g. `subscript(_:#newValue:)`. */ pragma[nomagic] -private predicate methodCallSelector(DataFlowCall call, string name, string argLabels) { - exists(CallExpr e | e = call.getCallExpr() | +private predicate methodCallSelector( + DataFlowCall call, string name, string joinLabels, string argLabels +) { + exists(CallExpr e, string suffix | + e = call.getCallExpr() and name = getSimpleNameFromExpr(e.getCallee()) and - if e = call.asSetterCall() - then argLabels = getArgLabelsFromCall(e) + "#newValue:" - else argLabels = getArgLabelsFromCall(e) + name = any(Selector s).getName() and + (if e = call.asSetterCall() then suffix = "#newValue:" else suffix = "") and + joinLabels = getJoinLabelsFromCall(e, name) + suffix and + argLabels = getArgLabelsFromCall(e) + suffix ) } pragma[nomagic] -private predicate constructorCallSelector(CallExpr call, TypeSelector type, string argLabels) { +private predicate constructorCallSelector( + CallExpr call, TypeSelector type, string joinLabels, string argLabels +) { ( if call.getCallee().(MemberAccessExpr).getMemberName() = "init" then type.getAStaticRef() = call.getCallee().(MemberAccessExpr).getBase() else type.getAStaticRef() = call.getCallee() ) and + joinLabels = getJoinLabelsFromCall(call, "init") and argLabels = getArgLabelsFromCall(call) } @@ -172,6 +202,53 @@ private newtype TSelector = isRawPropertyName(name) } +/** + * Holds if the `n`th label in `selector` is `label`, with any `?` suffix removed, and + * `optional` indicates whether the label had a `?` suffix. + * + * For example, `init(contentsOf:encoding?:)` has the labels `contentsOf` and `encoding`, + * where the latter is optional. + */ +private predicate selectorLabel(Selector selector, int n, string label, boolean optional) { + exists(string rawLabel | + rawLabel = selector.getArgLabels().splitAt(":", n) and + rawLabel != "" + | + if rawLabel.matches("%?") + then label = rawLabel.prefix(rawLabel.length() - 1) and optional = true + else ( + label = rawLabel and optional = false + ) + ) +} + +/** Holds if `label` is an optional named parameter of some selector with the method name `name`. */ +private predicate optionalArgLabel(string name, string label) { + exists(Selector selector | + name = selector.getName() and + selectorLabel(selector, _, label, true) and + label != "_" + ) +} + +/** + * Gets the named labels of `selector` that are not optional for any selector with the same + * method name. This is used to join with `getJoinLabelsFromCall`. + */ +private string getNamedJoinLabels(Selector selector) { + exists(string name | + name = selector.getName() and + result = + concat(int n, string label | + selectorLabel(selector, n, label, _) and + label != "_" and + not optionalArgLabel(name, label) + | + label + ":" order by n + ) + ) +} + /** * A tuple from a model that identifies call sites, callables, or property accesses. */ @@ -207,33 +284,76 @@ class Selector extends TSelector { result = this.getTypeString() + this.ppSubtypes() + "." + this.getPropertyName() } - /** Holds if `name,argLabels` should be used to join with `methodCallSelector`. */ + /** Holds if this selector has an optional argument, marked with a `?` suffix. */ + predicate hasOptionalArgument() { selectorLabel(this, _, _, true) } + + /** + * Gets a regular expression matching the argument labels of call sites matched by this + * selector, if it has optional arguments. + */ + string getArgLabelsRegexp() { + this.hasOptionalArgument() and + result = + concat(int n, string label, boolean optional, string part | + selectorLabel(this, n, label, optional) and + if optional = true then part = "(" + label + ":)?" else part = label + ":" + | + part order by n + ) + } + + /** Holds if `argLabels` from a call site is matched by this selector. */ + bindingset[this, argLabels] + pragma[inline_late] + private predicate matchesArgLabels(string argLabels) { + if this.hasOptionalArgument() + then argLabels.regexpMatch(this.getArgLabelsRegexp()) + else argLabels = this.getArgLabels() + } + + /** Holds if `name,joinLabels` should be used to join with `methodCallSelector`. */ pragma[nomagic] - private predicate matchesMethodCallSelector(string name, string argLabels) { - this = MkCallSelector(_, _, name, argLabels, _) and - name != "init" + private predicate matchesMethodCallSelector(string name, string joinLabels) { + this = MkCallSelector(_, _, name, _, _) and + name != "init" and + joinLabels = getNamedJoinLabels(this) } - /** Holds if `name,argLabels` should be used to join with `constructorCallSelector`. */ + /** Holds if `type,joinLabels` should be used to join with `constructorCallSelector`. */ pragma[nomagic] - private predicate matchesConstructorCallSelector(string name, string argLabels) { - this = MkCallSelector(name, _, "init", argLabels, _) + private predicate matchesConstructorCallSelector(string type, string joinLabels) { + this = MkCallSelector(type, _, "init", _, _) and + joinLabels = getNamedJoinLabels(this) } predicate matchesCall(DataFlowCall call) { - exists(string name, string argLabels | - this.matchesMethodCallSelector(name, argLabels) and - methodCallSelector(call, name, argLabels) + exists(string nameOrType, string joinLabels, string argLabels | + this.matchesMethodCallSelector(nameOrType, joinLabels) and + methodCallSelector(call, nameOrType, joinLabels, argLabels) or - this.matchesConstructorCallSelector(name, argLabels) and - constructorCallSelector(call.asExplicitCall(), name, argLabels) + this.matchesConstructorCallSelector(nameOrType, joinLabels) and + constructorCallSelector(call.asExplicitCall(), nameOrType, joinLabels, argLabels) + | + this.matchesArgLabels(argLabels) ) } + /** + * Gets the argument labels of this selector with any `?` suffixes removed. + * + * Callables must declare all parameters, including optional ones, so these are matched exactly + * against callables. + */ + string getDeclaredArgLabels() { + this = MkCallSelector(_, _, _, _, _) and + result = concat(int n, string label | selectorLabel(this, n, label, _) | label + ":" order by n) + } + predicate matchesCallable(Callable callable) { exists(string type, string name, string argLabels | callableSelector(callable, type, name, argLabels) and - this = MkCallSelector(type, true, name, argLabels, _) + this = MkCallSelector(type, true, name, _, _) and + argLabels = this.getDeclaredArgLabels() ) } @@ -248,9 +368,9 @@ class Selector extends TSelector { ) } - int getPositionalArity() { result = count(int n | this.getArgLabels().splitAt(":", n) = "_") } + int getPositionalArity() { result = count(int n | selectorLabel(this, n, "_", _)) } - string getANamedArgument() { result = this.getArgLabels().splitAt(":") and result != "_" } + string getANamedArgument() { selectorLabel(this, _, result, _) and result != "_" } } /** Gets the `n`th `.`-separated component in the given `type` string. */ @@ -325,7 +445,7 @@ class TypeSelector extends string { * * Used as a seed for type inference for when the constructor itself is not in the database. */ - CallExpr getAConstructorCall() { constructorCallSelector(result, this, _) } + CallExpr getAConstructorCall() { constructorCallSelector(result, this, _, _) } } private predicate isAccessPath(string path) { diff --git a/unified/ql/test/library-tests/mad/test.expected b/unified/ql/test/library-tests/mad/test.expected index a1f7d8989cdc..a839bc8e92d3 100644 --- a/unified/ql/test/library-tests/mad/test.expected +++ b/unified/ql/test/library-tests/mad/test.expected @@ -34,6 +34,15 @@ isSink | test.swift:218:9:218:14 | string | shorthand-sink | | test.swift:239:13:239:13 | 0 | subscript-getter-sink | | test.swift:240:5:240:10 | ... .subscript(...) | subscript-setter-sink | +| test.swift:263:18:263:23 | string | optional-named-sink | +| test.swift:264:18:264:23 | string | optional-named-sink | +| test.swift:268:18:268:23 | string | required-named-sink | +| test.swift:270:20:270:25 | string | optional-positional-sink | +| test.swift:271:20:271:25 | string | optional-positional-sink | +| test.swift:275:15:275:20 | string | optional-mixed-sink | +| test.swift:276:15:276:20 | string | optional-mixed-sink | +| test.swift:279:29:279:34 | string | optional-init-sink | +| test.swift:280:29:280:34 | string | optional-init-sink | isSource | test.swift:4:5:4:27 | String(...) | remote | | test.swift:5:5:5:44 | String(...) | remote | @@ -51,3 +60,4 @@ isSource | test.swift:209:5:213:5 | [self param] func ShorthandTestSub.sourceParams | shorthand-source | | test.swift:210:11:210:11 | x | shorthand-source | | test.swift:232:13:232:13 | v | subscript-setter-source | +| test.swift:253:11:253:11 | x | optional-source | diff --git a/unified/ql/test/library-tests/mad/test.ext.json b/unified/ql/test/library-tests/mad/test.ext.json index 8f540964d08c..9b3230c1798b 100644 --- a/unified/ql/test/library-tests/mad/test.ext.json +++ b/unified/ql/test/library-tests/mad/test.ext.json @@ -8,7 +8,8 @@ "data": [ // namespace, type, subtypes, name, signature, ext, output, kind, provenance ["", "ShorthandTest", true, "sourceParams(_:)", "", "", "Parameter[self,0]", "shorthand-source", "manual"], - ["", "SubscriptTest", true, "subscript(_:#newValue:)", "", "", "Parameter[#newValue:]", "subscript-setter-source", "manual"] + ["", "SubscriptTest", true, "subscript(_:#newValue:)", "", "", "Parameter[#newValue:]", "subscript-setter-source", "manual"], + ["", "OptionalTest", true, "source(_:y?:)", "", "", "Parameter[0]", "optional-source", "manual"] ] }, { @@ -20,7 +21,12 @@ // namespace, type, subtypes, name, signature, ext, input, kind, provenance ["", "ShorthandTest", true, "sinkArgs(_:)", "", "", "Argument[self,0]", "shorthand-sink", "manual"], ["", "SubscriptTest", true, "subscript(_:)", "", "", "Argument[0]", "subscript-getter-sink", "manual"], - ["", "SubscriptTest", true, "subscript(_:#newValue:)", "", "", "Argument[#newValue:]", "subscript-setter-sink", "manual"] + ["", "SubscriptTest", true, "subscript(_:#newValue:)", "", "", "Argument[#newValue:]", "subscript-setter-sink", "manual"], + ["", "OptionalTest", true, "named(a:b?:)", "", "", "Argument[a:]", "optional-named-sink", "manual"], + ["", "OptionalTest", true, "named(x:b:)", "", "", "Argument[x:]", "required-named-sink", "manual"], + ["", "OptionalTest", true, "positional(_:_?:)", "", "", "Argument[0]", "optional-positional-sink", "manual"], + ["", "OptionalTest", true, "mixed(_:x?:)", "", "", "Argument[0]", "optional-mixed-sink", "manual"], + ["", "OptionalInit", true, "init(value:flag?:)", "", "", "Argument[value:]", "optional-init-sink", "manual"] ] } ] diff --git a/unified/ql/test/library-tests/mad/test.swift b/unified/ql/test/library-tests/mad/test.swift index 5aa1d78ba1bd..97efba45f33d 100644 --- a/unified/ql/test/library-tests/mad/test.swift +++ b/unified/ql/test/library-tests/mad/test.swift @@ -239,3 +239,44 @@ func testSubscripts(obj: SubscriptTest, string: String) { _ = obj[0] // $ isSink=subscript-getter-sink obj[0] = string // $ isSink=subscript-setter-sink } + +class OptionalTest { + func source(_ x: String, y: Int = 0) {} + func named(a: String, b: Int = 0) {} + func named(x: String, b: Int) {} + func positional(_ x: String, _ y: Int = 0) {} + func mixed(_ x: String, x y: Int = 0) {} +} + +class OptionalTestSub: OptionalTest { + override func source( + _ x: String, // $ isSource=optional-source + y: Int = 0 + ) {} +} + +class OptionalInit { + init(value: String, flag: Bool = false) {} +} + +func testOptionalParameters(obj: OptionalTest, string: String) { + obj.named(a: string) // $ isSink=optional-named-sink + obj.named(a: string, b: 1) // $ isSink=optional-named-sink + obj.named(a: string, c: 1) // not a sink: unknown label + obj.named(b: 1, a: string) // not a sink: wrong order + obj.named(x: string) // not a sink: `b` is required here + obj.named(x: string, b: 1) // $ isSink=required-named-sink + + obj.positional(string) // $ isSink=optional-positional-sink + obj.positional(string, 1) // $ isSink=optional-positional-sink + obj.positional(string, 1, 2) // not a sink: too many arguments + obj.positional() // not a sink: too few arguments + + obj.mixed(string) // $ isSink=optional-mixed-sink + obj.mixed(string, x: 1) // $ isSink=optional-mixed-sink + obj.mixed(string, 1) // not a sink: missing label + + _ = OptionalInit(value: string) // $ isSink=optional-init-sink + _ = OptionalInit(value: string, flag: true) // $ isSink=optional-init-sink + _ = OptionalInit(flag: true) // not a sink: missing required argument +} From f15fe5186ed32b50bf1137b8bb0cd1f9e70df779 Mon Sep 17 00:00:00 2001 From: Asger F Date: Tue, 24 Nov 2026 15:58:36 +0100 Subject: [PATCH 2/2] Unified: Mark defaulted parameters as optional in legacy MaD models Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- unified/ql/lib/ext/database.model.json | 84 +++--- unified/ql/lib/ext/legacy-swift.model.json | 264 +++++++++--------- .../PathInjection/PathInjectionTest.expected | 21 ++ .../PathInjection/testPathInjection.swift | 14 +- 4 files changed, 202 insertions(+), 181 deletions(-) diff --git a/unified/ql/lib/ext/database.model.json b/unified/ql/lib/ext/database.model.json index 50f26fcb8fa7..bf71bb139f05 100644 --- a/unified/ql/lib/ext/database.model.json +++ b/unified/ql/lib/ext/database.model.json @@ -8,9 +8,9 @@ "data": [ // namespace, type, subtypes, name, signature, ext, input, kind, provenance // SQLite.swift - ["", "Connection", true, "key(_:db:)", "", "", "Argument[0]", "encryption-key", "manual"], - ["", "Connection", true, "keyAndMigrate(_:db:)", "", "", "Argument[0]", "encryption-key", "manual"], - ["", "Connection", true, "rekey(_:db:)", "", "", "Argument[0]", "encryption-key", "manual"], + ["", "Connection", true, "key(_:db?:)", "", "", "Argument[0]", "encryption-key", "manual"], + ["", "Connection", true, "keyAndMigrate(_:db?:)", "", "", "Argument[0]", "encryption-key", "manual"], + ["", "Connection", true, "rekey(_:db?:)", "", "", "Argument[0]", "encryption-key", "manual"], ["", "Connection", true, "sqlcipher_export(_:key:)", "", "", "Argument[key:]", "encryption-key", "manual"], ["", "Connection", true, "execute(_:)", "", "", "Argument[0]", "sql-injection", "manual"], ["", "Connection", true, "prepare(_:_:)", "", "", "Argument[0]", "sql-injection", "manual"], @@ -19,7 +19,7 @@ ["", "Connection", true, "run(_:_:)", "", "", "Argument[1]", "database-store", "manual"], ["", "Connection", true, "scalar(_:_:)", "", "", "Argument[0]", "database-store", "manual"], ["", "Connection", true, "scalar(_:_:)", "", "", "Argument[1]", "database-store", "manual"], - ["", "Connection", true, "init(_:readonly:)", "", "", "Argument[0]", "path-injection", "manual"], + ["", "Connection", true, "init(_?:readonly?:)", "", "", "Argument[0]", "path-injection", "manual"], ["", "Statement", true, "init(_:_:)", "", "", "Argument[1]", "sql-injection", "manual"], ["", "Statement", true, "bind(_:)", "", "", "Argument[0]", "database-store", "manual"], ["", "Statement", true, "run(_:)", "", "", "Argument[0]", "database-store", "manual"], @@ -35,57 +35,57 @@ ["", "QueryType", true, "upsert(_:onConflictOf:)", "", "", "Argument[0]", "database-store", "manual"], ["", "QueryType", true, "upsert(_:onConflictOf:setValues:)", "", "", "Argument[0]", "database-store", "manual"], ["", "QueryType", true, "upsert(_:onConflictOf:setValues:)", "", "", "Argument[setValues:]", "database-store", "manual"], - ["", "Connection.Location", true, "uri(_:parameters:)", "", "", "Argument[0]", "path-injection", "manual"], + ["", "Connection.Location", true, "uri(_:parameters?:)", "", "", "Argument[0]", "path-injection", "manual"], // GRDB ["", "Database", true, "changePassphrase(_:)", "", "", "Argument[0]", "encryption-key", "manual"], ["", "Database", true, "usePassphrase(_:)", "", "", "Argument[0]", "encryption-key", "manual"], - ["", "Database", true, "allStatements(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Database", true, "execute(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Database", true, "allStatements(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Database", true, "execute(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "Database", true, "init(path:description:configuration:)", "", "", "Argument[path:]", "path-injection", "manual"], - ["", "SQL", true, "append(sql:arguments:)", "", "", "Argument[sql:]", "sql-injection", "manual"], - ["", "SQL", true, "append(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "SQL", true, "init(sql:arguments:)", "", "", "Argument[sql:]", "sql-injection", "manual"], - ["", "SQL", true, "init(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "SQL", true, "append(sql:arguments?:)", "", "", "Argument[sql:]", "sql-injection", "manual"], + ["", "SQL", true, "append(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "SQL", true, "init(sql:arguments?:)", "", "", "Argument[sql:]", "sql-injection", "manual"], + ["", "SQL", true, "init(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "SQL", true, "init(stringLiteral:)", "", "", "Argument[stringLiteral:]", "sql-injection", "manual"], ["", "SQL", true, "init(unicodeScalarLiteral:)", "", "", "Argument[unicodeScalarLiteral:]", "sql-injection", "manual"], ["", "SQL", true, "init(extendedGraphemeClusterLiteral:)", "", "", "Argument[extendedGraphemeClusterLiteral:]", "sql-injection", "manual"], ["", "SQL", true, "init(stringInterpolation:)", "", "", "Argument[stringInterpolation:]", "sql-injection", "manual"], ["", "StatementCache", true, "statement(_:)", "", "", "Argument[0]", "sql-injection", "manual"], - ["", "SQLRequest", true, "init(sql:arguments:adapter:cached:)", "", "", "Argument[sql:]", "sql-injection", "manual"], - ["", "SQLRequest", true, "init(sql:arguments:adapter:cached:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "SQLRequest", true, "init(sql:arguments?:adapter?:cached?:)", "", "", "Argument[sql:]", "sql-injection", "manual"], + ["", "SQLRequest", true, "init(sql:arguments?:adapter?:cached?:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "SQLRequest", true, "init(stringLiteral:)", "", "", "Argument[stringLiteral:]", "sql-injection", "manual"], ["", "SQLRequest", true, "init(unicodeScalarLiteral:)", "", "", "Argument[unicodeScalarLiteral:]", "sql-injection", "manual"], ["", "SQLRequest", true, "init(extendedGraphemeClusterLiteral:)", "", "", "Argument[extendedGraphemeClusterLiteral:]", "sql-injection", "manual"], ["", "SQLRequest", true, "init(stringInterpolation:)", "", "", "Argument[stringInterpolation:]", "sql-injection", "manual"], - ["", "SQLStatementCursor", true, "init(database:sql:arguments:prepFlags:)", "", "", "Argument[sql:]", "sql-injection", "manual"], - ["", "SQLStatementCursor", true, "init(database:sql:arguments:prepFlags:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Row", true, "fetchAll(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Row", true, "fetchCursor(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Row", true, "fetchOne(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Row", true, "fetchSet(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "TableRecord", true, "filter(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "TableRecord", true, "order(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "TableRecord", true, "select(sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "TableRecord", true, "select(sql:arguments:as:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "DatabaseValueConvertible", true, "fetchAll(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "DatabaseValueConvertible", true, "fetchCursor(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "DatabaseValueConvertible", true, "fetchOne(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "DatabaseValueConvertible", true, "fetchSet(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "FetchableRecord", true, "fetchAll(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "FetchableRecord", true, "fetchCursor(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "FetchableRecord", true, "fetchOne(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "FetchableRecord", true, "fetchSet(_:sql:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "SQLStatementCursor", true, "init(database:sql:arguments:prepFlags?:)", "", "", "Argument[sql:]", "sql-injection", "manual"], + ["", "SQLStatementCursor", true, "init(database:sql:arguments:prepFlags?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Row", true, "fetchAll(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Row", true, "fetchCursor(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Row", true, "fetchOne(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Row", true, "fetchSet(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "TableRecord", true, "filter(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "TableRecord", true, "order(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "TableRecord", true, "select(sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "TableRecord", true, "select(sql:arguments?:as:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "DatabaseValueConvertible", true, "fetchAll(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "DatabaseValueConvertible", true, "fetchCursor(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "DatabaseValueConvertible", true, "fetchOne(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "DatabaseValueConvertible", true, "fetchSet(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "FetchableRecord", true, "fetchAll(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "FetchableRecord", true, "fetchCursor(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "FetchableRecord", true, "fetchOne(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "FetchableRecord", true, "fetchSet(_:sql:arguments?:adapter?:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "FetchableRecord", true, "fetchAll(_:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "FetchableRecord", true, "fetchCursor(_:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "FetchableRecord", true, "fetchOne(_:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "FetchableRecord", true, "fetchSet(_:arguments:adapter:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "Statement", true, "execute(arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "Statement", true, "execute(arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], ["", "Statement", true, "setArguments(_:)", "", "", "Argument[0]", "database-store", "manual"], - ["", "CommonTableExpression", true, "init(recursive:named:columns:sql:arguments:)", "", "", "Argument[arguments:]", "database-store", "manual"], - ["", "DatabasePool", true, "init(path:configuration:)", "", "", "Argument[path:]", "path-injection", "manual"], - ["", "DatabaseQueue", true, "init(path:configuration:)", "", "", "Argument[path:]", "path-injection", "manual"], - ["", "DatabaseSnapshotPool", true, "init(path:configuration:)", "", "", "Argument[path:]", "path-injection", "manual"], - ["", "SerializedDatabase", true, "init(path:configuration:defaultLabel:purpose:)", "", "", "Argument[path:]", "path-injection", "manual"], + ["", "CommonTableExpression", true, "init(recursive?:named:columns?:sql:arguments?:)", "", "", "Argument[arguments:]", "database-store", "manual"], + ["", "DatabasePool", true, "init(path:configuration?:)", "", "", "Argument[path:]", "path-injection", "manual"], + ["", "DatabaseQueue", true, "init(path:configuration?:)", "", "", "Argument[path:]", "path-injection", "manual"], + ["", "DatabaseSnapshotPool", true, "init(path:configuration?:)", "", "", "Argument[path:]", "path-injection", "manual"], + ["", "SerializedDatabase", true, "init(path:configuration?:defaultLabel:purpose?:)", "", "", "Argument[path:]", "path-injection", "manual"], // sqlite3 ["", "", false, "sqlite3_key(_:_:_:)", "", "", "Argument[1]", "encryption-key", "manual"], ["", "", false, "sqlite3_key_v2(_:_:_:_:)", "", "", "Argument[2]", "encryption-key", "manual"], @@ -118,11 +118,11 @@ ["", "", false, "sqlite3_open_v2(_:_:_:_:)", "", "", "Argument[0]", "path-injection", "manual"], // Realm ["", "Realm.Configuration", true, "encryptionKey", "", "", "PostUpdate", "encryption-key", "manual"], - ["", "Realm.Configuration", true, "init(fileURL:inMemoryIdentifier:syncConfiguration:encryptionKey:readOnly:schemaVersion:migrationBlock:deleteRealmIfMigrationNeeded:shouldCompactOnLaunch:objectTypes:)", "", "", "Argument[fileURL:]", "path-injection", "manual"], - ["", "Realm.Configuration", true, "init(fileURL:inMemoryIdentifier:syncConfiguration:encryptionKey:readOnly:schemaVersion:migrationBlock:deleteRealmIfMigrationNeeded:shouldCompactOnLaunch:objectTypes:)", "", "", "Argument[encryptionKey:]", "encryption-key", "manual"], - ["", "Realm.Configuration", true, "init(fileURL:inMemoryIdentifier:syncConfiguration:encryptionKey:readOnly:schemaVersion:migrationBlock:deleteRealmIfMigrationNeeded:shouldCompactOnLaunch:objectTypes:seedFilePath:)", "", "", "Argument[fileURL:]", "path-injection", "manual"], - ["", "Realm.Configuration", true, "init(fileURL:inMemoryIdentifier:syncConfiguration:encryptionKey:readOnly:schemaVersion:migrationBlock:deleteRealmIfMigrationNeeded:shouldCompactOnLaunch:objectTypes:seedFilePath:)", "", "", "Argument[encryptionKey:]", "encryption-key", "manual"], - ["", "Realm.Configuration", true, "init(fileURL:inMemoryIdentifier:syncConfiguration:encryptionKey:readOnly:schemaVersion:migrationBlock:deleteRealmIfMigrationNeeded:shouldCompactOnLaunch:objectTypes:seedFilePath:)", "", "", "Argument[seedFilePath:]", "path-injection", "manual"], + ["", "Realm.Configuration", true, "init(fileURL?:inMemoryIdentifier?:syncConfiguration?:encryptionKey?:readOnly?:schemaVersion?:migrationBlock?:deleteRealmIfMigrationNeeded?:shouldCompactOnLaunch?:objectTypes?:)", "", "", "Argument[fileURL:]", "path-injection", "manual"], + ["", "Realm.Configuration", true, "init(fileURL?:inMemoryIdentifier?:syncConfiguration?:encryptionKey?:readOnly?:schemaVersion?:migrationBlock?:deleteRealmIfMigrationNeeded?:shouldCompactOnLaunch?:objectTypes?:)", "", "", "Argument[encryptionKey:]", "encryption-key", "manual"], + ["", "Realm.Configuration", true, "init(fileURL?:inMemoryIdentifier?:syncConfiguration?:encryptionKey?:readOnly?:schemaVersion?:migrationBlock?:deleteRealmIfMigrationNeeded?:shouldCompactOnLaunch?:objectTypes?:seedFilePath:)", "", "", "Argument[fileURL:]", "path-injection", "manual"], + ["", "Realm.Configuration", true, "init(fileURL?:inMemoryIdentifier?:syncConfiguration?:encryptionKey?:readOnly?:schemaVersion?:migrationBlock?:deleteRealmIfMigrationNeeded?:shouldCompactOnLaunch?:objectTypes?:seedFilePath:)", "", "", "Argument[encryptionKey:]", "encryption-key", "manual"], + ["", "Realm.Configuration", true, "init(fileURL?:inMemoryIdentifier?:syncConfiguration?:encryptionKey?:readOnly?:schemaVersion?:migrationBlock?:deleteRealmIfMigrationNeeded?:shouldCompactOnLaunch?:objectTypes?:seedFilePath:)", "", "", "Argument[seedFilePath:]", "path-injection", "manual"], ["", "Realm.Configuration", true, "fileURL", "", "", "PostUpdate", "path-injection", "manual"], ["", "Realm.Configuration", true, "seedFilePath", "", "", "PostUpdate", "path-injection", "manual"] ] diff --git a/unified/ql/lib/ext/legacy-swift.model.json b/unified/ql/lib/ext/legacy-swift.model.json index 7719aa749f20..2ab695b45605 100644 --- a/unified/ql/lib/ext/legacy-swift.model.json +++ b/unified/ql/lib/ext/legacy-swift.model.json @@ -89,21 +89,21 @@ ["", "String.Index", true, "init(encodedOffset:)", "", "", "Argument[encodedOffset:]", "string-length", "manual"], ["", "Regex", true, "init(_:)", "", "", "Argument[0]", "regex-use", "manual"], ["", "Regex", true, "init(_:as:)", "", "", "Argument[0]", "regex-use", "manual"], - ["", "", false, "assert(_:_:file:line:)", "", "", "Argument[1]", "log-injection", "manual"], - ["", "", false, "precondition(_:_:file:line:)", "", "", "Argument[1]", "log-injection", "manual"], - ["", "", false, "assertionFailure(_:file:line:)", "", "", "Argument[0]", "log-injection", "manual"], - ["", "", false, "preconditionFailure(_:file:line:)", "", "", "Argument[0]", "log-injection", "manual"], - ["", "", false, "fatalError(_:file:line:)", "", "", "Argument[0]", "log-injection", "manual"], - ["", "", false, "dump(_:name:indent:maxDepth:maxItems:)", "", "", "Argument[0,name:]", "log-injection", "manual"], - ["", "", false, "print(_:separator:terminator:)", "", "", "Argument[0,separator:,terminator:]", "log-injection", "manual"], - ["", "", false, "debugPrint(_:separator:terminator:)", "", "", "Argument[0,separator:,terminator:]", "log-injection", "manual"], + ["", "", false, "assert(_:_?:file?:line?:)", "", "", "Argument[1]", "log-injection", "manual"], + ["", "", false, "precondition(_:_?:file?:line?:)", "", "", "Argument[1]", "log-injection", "manual"], + ["", "", false, "assertionFailure(_?:file?:line?:)", "", "", "Argument[0]", "log-injection", "manual"], + ["", "", false, "preconditionFailure(_?:file?:line?:)", "", "", "Argument[0]", "log-injection", "manual"], + ["", "", false, "fatalError(_?:file:line:)", "", "", "Argument[0]", "log-injection", "manual"], + ["", "", false, "dump(_:name?:indent?:maxDepth?:maxItems?:)", "", "", "Argument[0,name:]", "log-injection", "manual"], + ["", "", false, "print(_:separator?:terminator?:)", "", "", "Argument[0,separator:,terminator:]", "log-injection", "manual"], + ["", "", false, "debugPrint(_:separator?:terminator?:)", "", "", "Argument[0,separator:,terminator:]", "log-injection", "manual"], ["", "", false, "NSMakeRange(_:_:)", "", "", "Argument[0,1]", "nsstring-length", "manual"], ["", "", false, "NSLog(_:_:)", "", "", "Argument[0,1]", "log-injection", "manual"], ["", "", false, "NSLogv(_:_:)", "", "", "Argument[0,1]", "log-injection", "manual"], ["", "", false, "os_log(_:)", "", "", "Argument[0]", "log-injection", "manual"], - ["", "", false, "os_log(_:dso:log:_:_:)", "", "", "Argument[0,2]", "log-injection", "manual"], - ["", "", false, "os_log(_:dso:log:type:_:)", "", "", "Argument[0,1]", "log-injection", "manual"], - ["", "", false, "os_log(_:log:_:)", "", "", "Argument[1]", "log-injection", "manual"], + ["", "", false, "os_log(_:dso?:log?:_:_:)", "", "", "Argument[0,2]", "log-injection", "manual"], + ["", "", false, "os_log(_:dso:log?:type:_:)", "", "", "Argument[0,1]", "log-injection", "manual"], + ["", "", false, "os_log(_?:log?:_:)", "", "", "Argument[1]", "log-injection", "manual"], ["", "", false, "print(_:separator:terminator:toStream:)", "", "", "Argument[0,separator:,terminator:]", "log-injection", "manual"], ["", "", false, "vfprintf(_:_:_:)", "", "", "Argument[1,2]", "log-injection", "manual"], ["", "NSData", true, "init(contentsOf:)", "", "", "Argument[contentsOf:]", "path-injection", "manual"], @@ -112,10 +112,10 @@ ["", "NSData", true, "dataWithContentsOfMappedFile(_:)", "", "", "Argument[0]", "path-injection", "manual"], ["", "NSData", true, "init(contentsOfFile:options:)", "", "", "Argument[contentsOfFile:]", "path-injection", "manual"], ["", "NSData", true, "init(contentsOfMappedFile:)", "", "", "Argument[contentsOfMappedFile:]", "path-injection", "manual"], - ["", "NSData", true, "write(to:options:)", "", "", "Argument[to:]", "path-injection", "manual"], + ["", "NSData", true, "write(to:options?:)", "", "", "Argument[to:]", "path-injection", "manual"], ["", "NSData", true, "write(to:atomically:)", "", "", "Argument[to:]", "path-injection", "manual"], ["", "NSData", true, "write(toFile:atomically:)", "", "", "Argument[toFile:]", "path-injection", "manual"], - ["", "NSData", true, "write(toFile:options:)", "", "", "Argument[toFile:]", "path-injection", "manual"], + ["", "NSData", true, "write(toFile:options?:)", "", "", "Argument[toFile:]", "path-injection", "manual"], ["", "NSString", true, "character(at:)", "", "", "Argument[at:]", "nsstring-length", "manual"], ["", "NSString", true, "init(contentsOfFile:encoding:)", "", "", "Argument[contentsOfFile:]", "path-injection", "manual"], ["", "NSString", true, "init(contentsOfFile:usedEncoding:)", "", "", "Argument[contentsOfFile:]", "path-injection", "manual"], @@ -124,25 +124,25 @@ ["", "NSString", true, "write(to:atomically:encoding:)", "", "", "Argument[to:]", "path-injection", "manual"], ["", "NSString", true, "write(toFile:atomically:encoding:)", "", "", "Argument[toFile:]", "path-injection", "manual"], ["", "FileManager", true, "contents(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], - ["", "FileManager", true, "unzipItem(at:to:skipCRC32:progress:pathEncoding:)", "", "", "Argument[at:]", "unsafe-unpack", "manual"], + ["", "FileManager", true, "unzipItem(at:to:skipCRC32?:progress?:pathEncoding?:)", "", "", "Argument[at:]", "unsafe-unpack", "manual"], ["", "FileManager", true, "attributesOfItem(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "changeCurrentDirectoryPath(_:)", "", "", "Argument[0]", "path-injection", "manual"], ["", "FileManager", true, "changeFileAttributes(_:atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "contentsEqual(atPath:andPath:)", "", "", "Argument[atPath:,andPath:]", "path-injection", "manual"], - ["", "FileManager", true, "contentsOfDirectory(at:includingPropertiesForKeys:options:)", "", "", "Argument[at:]", "path-injection", "manual"], + ["", "FileManager", true, "contentsOfDirectory(at:includingPropertiesForKeys:options?:)", "", "", "Argument[at:]", "path-injection", "manual"], ["", "FileManager", true, "contentsOfDirectory(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "copyItem(at:to:)", "", "", "Argument[at:,to:]", "path-injection", "manual"], ["", "FileManager", true, "copyItem(atPath:toPath:)", "", "", "Argument[atPath:,toPath:]", "path-injection", "manual"], - ["", "FileManager", true, "createDirectory(at:withIntermediateDirectories:attributes:)", "", "", "Argument[at:]", "path-injection", "manual"], + ["", "FileManager", true, "createDirectory(at:withIntermediateDirectories:attributes?:)", "", "", "Argument[at:]", "path-injection", "manual"], ["", "FileManager", true, "createDirectory(atPath:attributes:)", "", "", "Argument[atPath:]", "path-injection", "manual"], - ["", "FileManager", true, "createDirectory(atPath:withIntermediateDirectories:attributes:)", "", "", "Argument[atPath:]", "path-injection", "manual"], - ["", "FileManager", true, "createFile(atPath:contents:attributes:)", "", "", "Argument[atPath:]", "path-injection", "manual"], + ["", "FileManager", true, "createDirectory(atPath:withIntermediateDirectories:attributes?:)", "", "", "Argument[atPath:]", "path-injection", "manual"], + ["", "FileManager", true, "createFile(atPath:contents:attributes?:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "createSymbolicLink(at:withDestinationURL:)", "", "", "Argument[at:,withDestinationURL:]", "path-injection", "manual"], ["", "FileManager", true, "createSymbolicLink(atPath:pathContent:)", "", "", "Argument[atPath:,pathContent:]", "path-injection", "manual"], ["", "FileManager", true, "createSymbolicLink(atPath:withDestinationPath:)", "", "", "Argument[atPath:,withDestinationPath:]", "path-injection", "manual"], ["", "FileManager", true, "destinationOfSymbolicLink(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "directoryContents(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], - ["", "FileManager", true, "enumerator(at:includingPropertiesForKeys:options:errorHandler:)", "", "", "Argument[at:]", "path-injection", "manual"], + ["", "FileManager", true, "enumerator(at:includingPropertiesForKeys:options?:errorHandler?:)", "", "", "Argument[at:]", "path-injection", "manual"], ["", "FileManager", true, "enumerator(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "fileAttributes(atPath:traverseLink:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "fileExists(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], @@ -154,14 +154,14 @@ ["", "FileManager", true, "pathContentOfSymbolicLink(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "removeItem(at:)", "", "", "Argument[at:]", "path-injection", "manual"], ["", "FileManager", true, "removeItem(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], - ["", "FileManager", true, "replaceItem(at:withItemAt:backupItemName:options:resultingItemURL:)", "", "", "Argument[at:,withItemAt:]", "path-injection", "manual"], - ["", "FileManager", true, "replaceItemAt(_:withItemAt:backupItemName:options:)", "", "", "Argument[0,withItemAt:]", "path-injection", "manual"], - ["", "FileManager", true, "replaceItemAtURL(originalItemURL:withItemAtURL:backupItemName:options:)", "", "", "Argument[originalItemURL:,withItemAtURL:]", "path-injection", "manual"], + ["", "FileManager", true, "replaceItem(at:withItemAt:backupItemName:options?:resultingItemURL:)", "", "", "Argument[at:,withItemAt:]", "path-injection", "manual"], + ["", "FileManager", true, "replaceItemAt(_:withItemAt:backupItemName?:options?:)", "", "", "Argument[0,withItemAt:]", "path-injection", "manual"], + ["", "FileManager", true, "replaceItemAtURL(originalItemURL:withItemAtURL:backupItemName?:options?:)", "", "", "Argument[originalItemURL:,withItemAtURL:]", "path-injection", "manual"], ["", "FileManager", true, "setAttributes(_:ofItemAtPath:)", "", "", "Argument[ofItemAtPath:]", "path-injection", "manual"], ["", "FileManager", true, "subpaths(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "subpathsOfDirectory(atPath:)", "", "", "Argument[atPath:]", "path-injection", "manual"], ["", "FileManager", true, "trashItem(at:resultingItemURL:)", "", "", "Argument[at:]", "path-injection", "manual"], - ["", "FileManager", true, "unmountVolume(at:options:completionHandler:)", "", "", "Argument[at:]", "path-injection", "manual"], + ["", "FileManager", true, "unmountVolume(at:options?:completionHandler:)", "", "", "Argument[at:]", "path-injection", "manual"], ["", "Data", true, "init(contentsOf:options:)", "", "", "Argument[contentsOf:]", "path-injection", "manual"], ["", "Data", true, "md5()", "", "", "Argument[self]", "weak-hash-input-MD5", "manual"], ["", "Data", true, "sha1()", "", "", "Argument[self]", "weak-hash-input-SHA1", "manual"], @@ -171,21 +171,21 @@ ["", "Data", true, "sha3(_:)", "", "", "Argument[self]", "weak-password-hash-input-SHA3", "manual"], ["", "Data", true, "sha384()", "", "", "Argument[self]", "weak-password-hash-input-SHA384", "manual"], ["", "Data", true, "sha512()", "", "", "Argument[self]", "weak-password-hash-input-SHA512", "manual"], - ["", "Data", true, "write(to:options:)", "", "", "Argument[to:]", "path-injection", "manual"], + ["", "Data", true, "write(to:options?:)", "", "", "Argument[to:]", "path-injection", "manual"], ["", "NSMutableString", true, "insert(_:at:)", "", "", "Argument[at:]", "nsstring-length", "manual"], ["", "NSMutableString", true, "character(at:)", "", "", "Argument[at:]", "nsstring-length", "manual"], ["", "NSMutableString", true, "substring(from:)", "", "", "Argument[from:]", "nsstring-length", "manual"], ["", "NSMutableString", true, "substring(to:)", "", "", "Argument[to:]", "nsstring-length", "manual"], ["", "AES", true, "init(key:blockMode:)", "", "", "Argument[blockMode:]", "encryption-block-mode", "manual"], ["", "AES", true, "init(key:blockMode:padding:)", "", "", "Argument[blockMode:]", "encryption-block-mode", "manual"], - ["", "NSRegularExpression", true, "init(pattern:options:)", "", "", "Argument[pattern:]", "regex-use", "manual"], - ["", "Blowfish", true, "init(key:blockMode:padding:)", "", "", "Argument[blockMode:]", "encryption-block-mode", "manual"], + ["", "NSRegularExpression", true, "init(pattern:options?:)", "", "", "Argument[pattern:]", "regex-use", "manual"], + ["", "Blowfish", true, "init(key:blockMode?:padding:)", "", "", "Argument[blockMode:]", "encryption-block-mode", "manual"], ["", "URLSessionConfiguration", false, "tlsMaximumSupportedProtocol", "", "", "PostUpdate", "tls-protocol-version", "manual"], ["", "URLSessionConfiguration", false, "tlsMinimumSupportedProtocol", "", "", "PostUpdate", "tls-protocol-version", "manual"], ["", "URLSessionConfiguration", false, "tlsMaximumSupportedProtocolVersion", "", "", "PostUpdate", "tls-protocol-version", "manual"], ["", "URLSessionConfiguration", false, "tlsMinimumSupportedProtocolVersion", "", "", "PostUpdate", "tls-protocol-version", "manual"], - ["", "NWConnection", true, "send(content:contentContext:isComplete:completion:)", "", "", "Argument[content:]", "transmission", "manual"], - ["", "Zip", true, "unzipFile(_:destination:overwrite:password:progress:fileOutputHandler:)", "", "", "Argument[0]", "unsafe-unpack", "manual"], + ["", "NWConnection", true, "send(content:contentContext?:isComplete?:completion:)", "", "", "Argument[content:]", "transmission", "manual"], + ["", "Zip", true, "unzipFile(_:destination:overwrite:password:progress?:fileOutputHandler?:)", "", "", "Argument[0]", "unsafe-unpack", "manual"], ["", "NSRange", true, "init(location:length:)", "", "", "Argument[location:,length:]", "nsstring-length", "manual"], ["", "NSUserScriptTask", true, "init(url:)", "", "", "Argument[url:]", "command-injection", "manual"], ["", "NSUserUnixTask", true, "execute(withArguments:completionHandler:)", "", "", "Argument[withArguments:]", "command-injection", "manual"], @@ -204,10 +204,10 @@ ["", "Process", true, "standardOutput", "", "", "PostUpdate", "command-injection", "manual"], ["", "WKWebView", true, "evaluateJavaScript(_:)", "", "", "Argument[0]", "code-injection", "manual"], ["", "WKWebView", true, "evaluateJavaScript(_:completionHandler:)", "", "", "Argument[0]", "code-injection", "manual"], - ["", "WKWebView", true, "evaluateJavaScript(_:in:in:completionHandler:)", "", "", "Argument[0]", "code-injection", "manual"], - ["", "WKWebView", true, "evaluateJavaScript(_:in:contentWorld:)", "", "", "Argument[0]", "code-injection", "manual"], - ["", "WKWebView", true, "callAsyncJavaScript(_:arguments:in:in:completionHandler:)", "", "", "Argument[0]", "code-injection", "manual"], - ["", "WKWebView", true, "callAsyncJavaScript(_:arguments:in:contentWorld:)", "", "", "Argument[0]", "code-injection", "manual"], + ["", "WKWebView", true, "evaluateJavaScript(_:in?:in:completionHandler?:)", "", "", "Argument[0]", "code-injection", "manual"], + ["", "WKWebView", true, "evaluateJavaScript(_:in?:contentWorld:)", "", "", "Argument[0]", "code-injection", "manual"], + ["", "WKWebView", true, "callAsyncJavaScript(_:arguments?:in?:in:completionHandler?:)", "", "", "Argument[0]", "code-injection", "manual"], + ["", "WKWebView", true, "callAsyncJavaScript(_:arguments?:in?:contentWorld:)", "", "", "Argument[0]", "code-injection", "manual"], ["", "WKUserContentController", true, "addUserScript(_:)", "", "", "Argument[0]", "code-injection", "manual"], ["", "UIWebView", true, "stringByEvaluatingJavaScript(from:)", "", "", "Argument[from:]", "code-injection", "manual"], ["", "WebView", true, "stringByEvaluatingJavaScript(from:)", "", "", "Argument[from:]", "code-injection", "manual"], @@ -233,11 +233,11 @@ ["", "MD5", true, "callAsFunction(_:)", "", "", "Argument[0]", "weak-hash-input-MD5", "manual"], ["", "MD5", true, "calculate(for:)", "", "", "Argument[for:]", "weak-hash-input-MD5", "manual"], ["", "MD5", true, "process(block:currentHash:)", "", "", "Argument[block:]", "weak-hash-input-MD5", "manual"], - ["", "MD5", true, "update(withBytes:isLast:)", "", "", "Argument[withBytes:]", "weak-hash-input-MD5", "manual"], + ["", "MD5", true, "update(withBytes:isLast?:)", "", "", "Argument[withBytes:]", "weak-hash-input-MD5", "manual"], ["", "SHA1", true, "callAsFunction(_:)", "", "", "Argument[0]", "weak-hash-input-SHA1", "manual"], ["", "SHA1", true, "calculate(for:)", "", "", "Argument[for:]", "weak-hash-input-SHA1", "manual"], ["", "SHA1", true, "process(block:currentHash:)", "", "", "Argument[block:]", "weak-hash-input-SHA1", "manual"], - ["", "SHA1", true, "update(withBytes:isLast:)", "", "", "Argument[withBytes:]", "weak-hash-input-SHA1", "manual"], + ["", "SHA1", true, "update(withBytes:isLast?:)", "", "", "Argument[withBytes:]", "weak-hash-input-SHA1", "manual"], ["", "Logger", true, "warning(_:)", "", "", "Argument[0]", "log-injection", "manual"], ["", "Logger", true, "error(_:)", "", "", "Argument[0]", "log-injection", "manual"], ["", "Logger", true, "critical(_:)", "", "", "Argument[0]", "log-injection", "manual"], @@ -248,7 +248,7 @@ ["", "Logger", true, "log(level:_:)", "", "", "Argument[0]", "log-injection", "manual"], ["", "Logger", true, "notice(_:)", "", "", "Argument[0]", "log-injection", "manual"], ["", "Logger", true, "trace(_:)", "", "", "Argument[0]", "log-injection", "manual"], - ["", "NSException", true, "init(name:reason:userInfo:)", "", "", "Argument[reason:]", "log-injection", "manual"], + ["", "NSException", true, "init(name:reason:userInfo?:)", "", "", "Argument[reason:]", "log-injection", "manual"], ["", "NSException", true, "raise(_:format:arguments:)", "", "", "Argument[format:,arguments:]", "log-injection", "manual"], ["", "SHA256", true, "hash(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA256", "manual"], ["", "SHA256", true, "hash(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA256", "manual"], @@ -256,7 +256,7 @@ ["", "SHA256", true, "update(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA256", "manual"], ["", "SHA2", true, "callAsFunction(_:)", "", "", "Argument[0]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA2", true, "calculate(for:)", "", "", "Argument[for:]", "weak-password-hash-input-SHA2", "manual"], - ["", "SHA2", true, "update(withBytes:isLast:)", "", "", "Argument[withBytes:]", "weak-password-hash-input-SHA2", "manual"], + ["", "SHA2", true, "update(withBytes:isLast?:)", "", "", "Argument[withBytes:]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA2", true, "process32(block:currentHash:)", "", "", "Argument[block:]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA2", true, "process64(block:currentHash:)", "", "", "Argument[block:]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA384", true, "hash(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA384", "manual"], @@ -266,14 +266,14 @@ ["", "SHA3", true, "callAsFunction(_:)", "", "", "Argument[0]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA3", true, "calculate(for:)", "", "", "Argument[for:]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA3", true, "process(block:currentHash:)", "", "", "Argument[block:]", "weak-password-hash-input-SHA2", "manual"], - ["", "SHA3", true, "update(withBytes:isLast:)", "", "", "Argument[withBytes:]", "weak-password-hash-input-SHA2", "manual"], + ["", "SHA3", true, "update(withBytes:isLast?:)", "", "", "Argument[withBytes:]", "weak-password-hash-input-SHA2", "manual"], ["", "SHA512", true, "hash(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA512", "manual"], ["", "SHA512", true, "hash(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA512", "manual"], ["", "SHA512", true, "update(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA512", "manual"], ["", "SHA512", true, "update(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA512", "manual"], - ["", "ArchiveByteStream", true, "fileStream(fd:automaticClose:)", "", "", "Argument[fd:]", "path-injection", "manual"], + ["", "ArchiveByteStream", true, "fileStream(fd:automaticClose?:)", "", "", "Argument[fd:]", "path-injection", "manual"], ["", "ArchiveByteStream", true, "fileStream(path:mode:options:permissions:)", "", "", "Argument[path:]", "path-injection", "manual"], - ["", "ArchiveByteStream", true, "withFileStream(fd:automaticClose:_:)", "", "", "Argument[fd:]", "path-injection", "manual"], + ["", "ArchiveByteStream", true, "withFileStream(fd:automaticClose?:_:)", "", "", "Argument[fd:]", "path-injection", "manual"], ["", "ArchiveByteStream", true, "withFileStream(path:mode:options:permissions:_:)", "", "", "Argument[path:]", "path-injection", "manual"], ["", "Bundle", true, "init(url:)", "", "", "Argument[url:]", "path-injection", "manual"], ["", "Bundle", true, "init(path:)", "", "", "Argument[path:]", "path-injection", "manual"], @@ -294,12 +294,12 @@ ["", "UnsafeMutableRawPointer", true, "init(_:)", "", "", "Argument[0].OptionalSome.CollectionElement", "ReturnValue.OptionalSome.CollectionElement", "value", "manual"], ["", "UnsafeMutableRawPointer", true, "init(mutating:)", "", "", "Argument[mutating:].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "UnsafeMutableRawPointer", true, "init(mutating:)", "", "", "Argument[mutating:].OptionalSome.CollectionElement", "ReturnValue.OptionalSome.CollectionElement", "value", "manual"], - ["", "UnsafeMutableRawPointer", true, "storeBytes(of:toByteOffset:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], + ["", "UnsafeMutableRawPointer", true, "storeBytes(of:toByteOffset?:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawPointer", true, "withMemoryRebound(to:capacity:_:)", "", "", "Argument[self].CollectionElement", "Argument[2].Parameter[0].CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawPointer", true, "withMemoryRebound(to:capacity:_:)", "", "", "Argument[2].ReturnValue", "ReturnValue", "value", "manual"], ["", "UnsafeMutableRawPointer", true, "withMemoryRebound(to:capacity:_:)", "", "", "Argument[2].Parameter[0].CollectionElement", "Argument[self].CollectionElement", "taint", "manual"], - ["", "UnsafeMutableRawPointer", true, "loadUnaligned(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "UnsafeMutableRawPointer", true, "load(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeMutableRawPointer", true, "loadUnaligned(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeMutableRawPointer", true, "load(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], ["", "UnsafeMutableRawPointer", true, "assumingMemoryBound(to:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawPointer", true, "bindMemory(to:capacity:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawPointer", true, "alignedDown(toMultipleOf:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], @@ -349,7 +349,7 @@ ["", "BinaryInteger", true, "distance(to:)", "", "", "Argument[self,to:]", "ReturnValue", "taint", "manual"], ["", "BinaryInteger", true, "formatted()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "BinaryInteger", true, "formatted(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "BinaryInteger", true, "init(_:format:lenient:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], + ["", "BinaryInteger", true, "init(_:format:lenient?:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "BinaryInteger", true, "init(_:strategy:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "withContiguousStorageIfAvailable(_:)", "", "", "Argument[self]", "Argument[0].Parameter[0].CollectionElement", "taint", "manual"], ["", "Sequence", true, "withContiguousStorageIfAvailable(_:)", "", "", "Argument[self].CollectionElement", "Argument[0].Parameter[0].CollectionElement", "value", "manual"], @@ -357,20 +357,20 @@ ["", "Sequence", true, "makeIterator()", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "suffix(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "suffix(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Sequence", true, "dropLast(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Sequence", true, "dropLast(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Sequence", true, "split(maxSplits:omittingEmptySubsequences:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Sequence", true, "split(maxSplits:omittingEmptySubsequences:whereSeparator:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Sequence", true, "dropLast(_?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Sequence", true, "dropLast(_?:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Sequence", true, "split(maxSplits?:omittingEmptySubsequences?:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Sequence", true, "split(maxSplits?:omittingEmptySubsequences?:whereSeparator:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "prefix(while:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "prefix(while:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "prefix(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "prefix(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "drop(while:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "drop(while:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Sequence", true, "dropFirst(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Sequence", true, "dropFirst(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Sequence", true, "split(separator:maxSplits:omittingEmptySubsequences:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Sequence", true, "split(separator:maxSplits:omittingEmptySubsequences:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Sequence", true, "dropFirst(_?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Sequence", true, "dropFirst(_?:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Sequence", true, "split(separator:maxSplits?:omittingEmptySubsequences?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Sequence", true, "split(separator:maxSplits?:omittingEmptySubsequences?:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "shuffled()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Sequence", true, "shuffled()", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Sequence", true, "shuffled(using:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], @@ -456,12 +456,12 @@ ["", "Collection", true, "removeFirst()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "suffix(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "suffix(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Collection", true, "dropLast(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Collection", true, "dropLast(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Collection", true, "dropLast(_?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Collection", true, "dropLast(_?:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Collection", true, "randomElement()", "", "", "Argument[self].CollectionElement", "ReturnValue.OptionalSome", "value", "manual"], ["", "Collection", true, "randomElement(using:)", "", "", "Argument[self].CollectionElement", "ReturnValue.OptionalSome", "value", "manual"], ["", "Collection", true, "popFirst()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Collection", true, "split(maxSplits:omittingEmptySubsequences:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Collection", true, "split(maxSplits?:omittingEmptySubsequences?:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "prefix(through:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "prefix(through:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Collection", true, "suffix(from:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -471,9 +471,9 @@ ["", "Collection", true, "prefix(while:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Collection", true, "prefix(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "prefix(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Collection", true, "dropFirst(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Collection", true, "dropFirst(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "Collection", true, "split(separator:maxSplits:omittingEmptySubsequences:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Collection", true, "dropFirst(_?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Collection", true, "dropFirst(_?:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "Collection", true, "split(separator:maxSplits?:omittingEmptySubsequences?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "flatMap(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Collection", true, "flatMap(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "Collection", true, "trimmingPrefix(while:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -484,8 +484,8 @@ ["", "UnsafeRawPointer", true, "init(_:)", "", "", "Argument[0].OptionalSome.CollectionElement", "ReturnValue.OptionalSome.CollectionElement", "value", "manual"], ["", "UnsafeRawPointer", true, "withMemoryRebound(to:capacity:_:)", "", "", "Argument[self].CollectionElement", "Argument[2].Parameter[0].CollectionElement", "taint", "manual"], ["", "UnsafeRawPointer", true, "withMemoryRebound(to:capacity:_:)", "", "", "Argument[2].ReturnValue", "ReturnValue", "value", "manual"], - ["", "UnsafeRawPointer", true, "loadUnaligned(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "UnsafeRawPointer", true, "load(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeRawPointer", true, "loadUnaligned(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeRawPointer", true, "load(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], ["", "UnsafeRawPointer", true, "assumingMemoryBound(to:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeRawPointer", true, "bindMemory(to:capacity:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeRawPointer", true, "alignedDown(toMultipleOf:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], @@ -497,10 +497,10 @@ ["", "Slice", true, "insert(_:at:)", "", "", "Argument[0]", "Argument[self].CollectionElement", "value", "manual"], ["", "Slice", true, "insert(contentsOf:at:)", "", "", "Argument[contentsOf:].CollectionElement", "Argument[self].CollectionElement", "value", "manual"], ["", "Slice", true, "replaceSubrange(_:with:)", "", "", "Argument[with:].CollectionElement", "Argument[self].CollectionElement", "value", "manual"], - ["", "Slice", true, "storeBytes(of:toByteOffset:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], + ["", "Slice", true, "storeBytes(of:toByteOffset?:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], ["", "Slice", true, "update(repeating:)", "", "", "Argument[repeating:]", "Argument[self].CollectionElement", "value", "manual"], - ["", "Slice", true, "loadUnaligned(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "Slice", true, "load(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "Slice", true, "loadUnaligned(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "Slice", true, "load(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], ["", "Slice", true, "assumingMemoryBound(to:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "Slice", true, "withMemoryRebound(to:_:)", "", "", "Argument[self].CollectionElement", "Argument[1].Parameter[0].CollectionElement", "taint", "manual"], ["", "Slice", true, "withMemoryRebound(to:_:)", "", "", "Argument[1].Parameter[0].CollectionElement", "Argument[self].CollectionElement", "taint", "manual"], @@ -538,9 +538,9 @@ ["", "BidirectionalCollection", true, "dropLast(_:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "BidirectionalCollection", true, "suffix(from:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "BidirectionalCollection", true, "last(where:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "BidirectionalCollection", true, "joined(separator:)", "", "", "Argument[self,separator:]", "ReturnValue", "taint", "manual"], - ["", "BidirectionalCollection", true, "joined(separator:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "BidirectionalCollection", true, "joined(separator:)", "", "", "Argument[self].CollectionElement.CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], + ["", "BidirectionalCollection", true, "joined(separator?:)", "", "", "Argument[self,separator:]", "ReturnValue", "taint", "manual"], + ["", "BidirectionalCollection", true, "joined(separator?:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "BidirectionalCollection", true, "joined(separator?:)", "", "", "Argument[self].CollectionElement.CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "BidirectionalCollection", true, "reversed()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "BidirectionalCollection", true, "reversed()", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "String", true, "init(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], @@ -554,11 +554,11 @@ ["", "String", true, "init(from:)", "", "", "Argument[from:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "String", true, "randomElement()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "String", true, "randomElement(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "String", true, "split(maxSplits:omittingEmptySubsequences:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "String", true, "split(maxSplits?:omittingEmptySubsequences?:whereSeparator:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "String", true, "init(stringLiteral:)", "", "", "Argument[stringLiteral:]", "ReturnValue", "taint", "manual"], ["", "String", true, "init(stringInterpolation:)", "", "", "Argument[stringInterpolation:]", "ReturnValue", "taint", "manual"], - ["", "String", true, "decodeCString(_:as:repairingInvalidCodeUnits:)", "", "", "Argument[0]", "ReturnValue.TupleElement[0]", "taint", "manual"], - ["", "String", true, "decodeCString(_:as:repairingInvalidCodeUnits:)", "", "", "Argument[0].CollectionElement", "ReturnValue.TupleElement[0]", "taint", "manual"], + ["", "String", true, "decodeCString(_:as:repairingInvalidCodeUnits?:)", "", "", "Argument[0]", "ReturnValue.TupleElement[0]", "taint", "manual"], + ["", "String", true, "decodeCString(_:as:repairingInvalidCodeUnits?:)", "", "", "Argument[0].CollectionElement", "ReturnValue.TupleElement[0]", "taint", "manual"], ["", "String", true, "init(validatingUTF8:)", "", "", "Argument[validatingUTF8:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "String", true, "init(validatingUTF8:)", "", "", "Argument[validatingUTF8:].CollectionElement", "ReturnValue.OptionalSome", "taint", "manual"], ["", "String", true, "enumerated()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -570,7 +570,7 @@ ["", "String", true, "withUTF8(_:)", "", "", "Argument[0].Parameter[0].CollectionElement", "Argument[self]", "taint", "manual"], ["", "String", true, "withUTF8(_:)", "", "", "Argument[0].ReturnValue", "ReturnValue", "value", "manual"], ["", "String", true, "init(unsafeUninitializedCapacity:initializingUTF8With:)", "", "", "Argument[initializingUTF8With:].Parameter[0].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "String", true, "init(_:radix:uppercase:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], + ["", "String", true, "init(_:radix:uppercase?:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "String", true, "init(validating:)", "", "", "Argument[validating:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "String", true, "init(describing:)", "", "", "Argument[describing:]", "ReturnValue", "taint", "manual"], ["", "String", true, "init(contentsOf:)", "", "", "Argument[contentsOf:]", "ReturnValue", "taint", "manual"], @@ -613,12 +613,12 @@ ["", "BinaryFloatingPoint", true, "init(sign:exponentBitPattern:significandBitPattern:)", "", "", "Argument[sign:,exponentBitPattern:,significandBitPattern:]", "ReturnValue", "taint", "manual"], ["", "BinaryFloatingPoint", true, "formatted()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "BinaryFloatingPoint", true, "formatted(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "BinaryFloatingPoint", true, "init(_:format:lenient:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], + ["", "BinaryFloatingPoint", true, "init(_:format:lenient?:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "BinaryFloatingPoint", true, "init(_:strategy:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "UnsafeRawBufferPointer", true, "init(_:)", "", "", "Argument[0].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "UnsafeRawBufferPointer", true, "init(start:count:)", "", "", "Argument[start:].OptionalSome.CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], - ["", "UnsafeRawBufferPointer", true, "loadUnaligned(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "UnsafeRawBufferPointer", true, "load(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeRawBufferPointer", true, "loadUnaligned(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeRawBufferPointer", true, "load(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], ["", "UnsafeRawBufferPointer", true, "assumingMemoryBound(to:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeRawBufferPointer", true, "withMemoryRebound(to:_:)", "", "", "Argument[self].CollectionElement", "Argument[1].Parameter[0].CollectionElement", "taint", "manual"], ["", "UnsafeRawBufferPointer", true, "withMemoryRebound(to:_:)", "", "", "Argument[1].ReturnValue", "ReturnValue", "value", "manual"], @@ -661,9 +661,9 @@ ["", "UnsafeMutableRawBufferPointer", true, "init(_:)", "", "", "Argument[0].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], ["", "UnsafeMutableRawBufferPointer", true, "init(start:count:)", "", "", "Argument[start:].OptionalSome.CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawBufferPointer", true, "init(mutating:)", "", "", "Argument[mutating:].CollectionElement", "ReturnValue.CollectionElement", "value", "manual"], - ["", "UnsafeMutableRawBufferPointer", true, "storeBytes(of:toByteOffset:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], - ["", "UnsafeMutableRawBufferPointer", true, "loadUnaligned(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "UnsafeMutableRawBufferPointer", true, "load(fromByteOffset:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeMutableRawBufferPointer", true, "storeBytes(of:toByteOffset?:as:)", "", "", "Argument[of:]", "Argument[self].CollectionElement", "taint", "manual"], + ["", "UnsafeMutableRawBufferPointer", true, "loadUnaligned(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], + ["", "UnsafeMutableRawBufferPointer", true, "load(fromByteOffset?:as:)", "", "", "Argument[self].CollectionElement", "ReturnValue", "taint", "manual"], ["", "UnsafeMutableRawBufferPointer", true, "assumingMemoryBound(to:)", "", "", "Argument[self].CollectionElement", "ReturnValue.CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawBufferPointer", true, "withMemoryRebound(to:_:)", "", "", "Argument[self].CollectionElement", "Argument[1].Parameter[0].CollectionElement", "taint", "manual"], ["", "UnsafeMutableRawBufferPointer", true, "withMemoryRebound(to:_:)", "", "", "Argument[1].Parameter[0].CollectionElement", "Argument[self].CollectionElement", "taint", "manual"], @@ -717,7 +717,7 @@ ["", "StringProtocol", true, "init(decoding:as:)", "", "", "Argument[decoding:]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "uppercased()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "lowercased()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "StringProtocol", true, "getBytes(_:maxLength:usedLength:encoding:options:range:remaining:)", "", "", "Argument[self]", "Argument[0].CollectionElement", "taint", "manual"], + ["", "StringProtocol", true, "getBytes(_:maxLength:usedLength:encoding:options?:range:remaining:)", "", "", "Argument[self]", "Argument[0].CollectionElement", "taint", "manual"], ["", "StringProtocol", true, "getCString(_:maxLength:encoding:)", "", "", "Argument[self]", "Argument[0].CollectionElement", "taint", "manual"], ["", "StringProtocol", true, "appending(_:)", "", "", "Argument[self,0]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "addingPercentEscapes(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -726,11 +726,11 @@ ["", "StringProtocol", true, "applyingTransform(_:reverse:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "cString(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "capitalized(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "StringProtocol", true, "completePath(into:caseSensitive:matchesInto:filterTypes:)", "", "", "Argument[self]", "Argument[into:].CollectionElement", "taint", "manual"], - ["", "StringProtocol", true, "completePath(into:caseSensitive:matchesInto:filterTypes:)", "", "", "Argument[self]", "Argument[matchesInto:].CollectionElement.CollectionElement", "taint", "manual"], + ["", "StringProtocol", true, "completePath(into?:caseSensitive:matchesInto?:filterTypes?:)", "", "", "Argument[self]", "Argument[into:].CollectionElement", "taint", "manual"], + ["", "StringProtocol", true, "completePath(into?:caseSensitive:matchesInto?:filterTypes?:)", "", "", "Argument[self]", "Argument[matchesInto:].CollectionElement.CollectionElement", "taint", "manual"], ["", "StringProtocol", true, "components(separatedBy:)", "", "", "Argument[self]", "ReturnValue.CollectionElement", "taint", "manual"], - ["", "StringProtocol", true, "data(using:allowLossyConversion:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "StringProtocol", true, "folding(options:locale:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "StringProtocol", true, "data(using:allowLossyConversion?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "StringProtocol", true, "folding(options?:locale:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "lowercased(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "padding(toLength:withPad:startingAt:)", "", "", "Argument[withPad:]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "padding(toLength:withPad:startingAt:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -738,8 +738,8 @@ ["", "StringProtocol", true, "propertyListFromStringsFileFormat()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "replacingCharacters(in:with:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "replacingCharacters(in:with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "StringProtocol", true, "replacingOccurrences(of:with:options:range:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], - ["", "StringProtocol", true, "replacingOccurrences(of:with:options:range:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "StringProtocol", true, "replacingOccurrences(of:with:options?:range?:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], + ["", "StringProtocol", true, "replacingOccurrences(of:with:options?:range?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "replacingPercentEscapes(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "substring(from:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "StringProtocol", true, "substring(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], @@ -773,7 +773,7 @@ ["", "", false, "max(_:_:_:_:)", "", "", "Argument[3].CollectionElement", "ReturnValue", "taint", "manual"], ["", "", false, "unsafeBitCast(_:to:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "", false, "unsafeDowncast(_:to:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], - ["", "", false, "dump(_:to:name:indent:maxDepth:maxItems:)", "", "", "Argument[0,name:]", "Argument[to:]", "taint", "manual"], + ["", "", false, "dump(_:to:name?:indent?:maxDepth?:maxItems?:)", "", "", "Argument[0,name:]", "Argument[to:]", "taint", "manual"], ["", "", false, "abs(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "", false, "numericCast(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "", false, "withExtendedLifetime(_:_:)", "", "", "Argument[1].ReturnValue", "ReturnValue", "value", "manual"], @@ -784,10 +784,10 @@ ["", "", false, "withUnsafePointer(to:_:)", "", "", "Argument[1].ReturnValue", "ReturnValue", "value", "manual"], ["", "", false, "swap(_:_:)", "", "", "Argument[0]", "Argument[1]", "value", "manual"], ["", "", false, "swap(_:_:)", "", "", "Argument[1]", "Argument[0]", "value", "manual"], - ["", "", false, "print(_:separator:terminator:to:)", "", "", "Argument[0].CollectionElement", "Argument[to:]", "taint", "manual"], - ["", "", false, "print(_:separator:terminator:to:)", "", "", "Argument[separator:,terminator:]", "Argument[to:]", "taint", "manual"], - ["", "", false, "debugPrint(_:separator:terminator:to:)", "", "", "Argument[0].CollectionElement", "Argument[to:]", "taint", "manual"], - ["", "", false, "debugPrint(_:separator:terminator:to:)", "", "", "Argument[separator:,terminator:]", "Argument[to:]", "taint", "manual"], + ["", "", false, "print(_:separator?:terminator?:to:)", "", "", "Argument[0].CollectionElement", "Argument[to:]", "taint", "manual"], + ["", "", false, "print(_:separator?:terminator?:to:)", "", "", "Argument[separator:,terminator:]", "Argument[to:]", "taint", "manual"], + ["", "", false, "debugPrint(_:separator?:terminator?:to:)", "", "", "Argument[0].CollectionElement", "Argument[to:]", "taint", "manual"], + ["", "", false, "debugPrint(_:separator?:terminator?:to:)", "", "", "Argument[separator:,terminator:]", "Argument[to:]", "taint", "manual"], ["", "", false, "withUnsafeTemporaryAllocation(byteCount:alignment:_:)", "", "", "Argument[2].ReturnValue", "ReturnValue", "value", "manual"], ["", "", false, "withUnsafeTemporaryAllocation(of:capacity:_:)", "", "", "Argument[2].ReturnValue", "ReturnValue", "value", "manual"], ["", "", false, "withVaList(_:_:)", "", "", "Argument[0]", "Argument[1].Parameter[0]", "value", "manual"], @@ -812,34 +812,34 @@ ["", "URL", true, "formatted()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "formatted(_:)", "", "", "Argument[self,0]", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(_:strategy:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "append(component:directoryHint:)", "", "", "Argument[self,component:]", "Argument[self]", "taint", "manual"], - ["", "URL", true, "append(components:directoryHint:)", "", "", "Argument[self,components:]", "Argument[self]", "taint", "manual"], - ["", "URL", true, "append(path:directoryHint:)", "", "", "Argument[self,path:]", "Argument[self]", "taint", "manual"], + ["", "URL", true, "append(component:directoryHint?:)", "", "", "Argument[self,component:]", "Argument[self]", "taint", "manual"], + ["", "URL", true, "append(components:directoryHint?:)", "", "", "Argument[self,components:]", "Argument[self]", "taint", "manual"], + ["", "URL", true, "append(path:directoryHint?:)", "", "", "Argument[self,path:]", "Argument[self]", "taint", "manual"], ["", "URL", true, "append(queryItems:)", "", "", "Argument[self,queryItems:]", "Argument[self]", "taint", "manual"], ["", "URL", true, "appendPathComponent(_:)", "", "", "Argument[self,0]", "Argument[self]", "taint", "manual"], ["", "URL", true, "appendPathComponent(_:conformingTo:)", "", "", "Argument[self,0]", "Argument[self]", "taint", "manual"], ["", "URL", true, "appendPathComponent(_:isDirectory:)", "", "", "Argument[self,0]", "Argument[self]", "taint", "manual"], ["", "URL", true, "appendPathExtension(_:)", "", "", "Argument[self,0]", "Argument[self]", "taint", "manual"], - ["", "URL", true, "appending(component:directoryHint:)", "", "", "Argument[self,component:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "appending(components:directoryHint:)", "", "", "Argument[self,components:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "appending(path:directoryHint:)", "", "", "Argument[self,path:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "appending(component:directoryHint?:)", "", "", "Argument[self,component:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "appending(components:directoryHint?:)", "", "", "Argument[self,components:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "appending(path:directoryHint?:)", "", "", "Argument[self,path:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "appending(queryItems:)", "", "", "Argument[self,queryItems:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "bookmarkData(options:includingResourceValuesForKeys:relativeTo:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "bookmarkData(options:includingResourceValuesForKeys:relativeTo:)", "", "", "Argument[includingResourceValuesForKeys:].OptionalSome.CollectionElement", "ReturnValue", "taint", "manual"], - ["", "URL", true, "bookmarkData(options:includingResourceValuesForKeys:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], + ["", "URL", true, "bookmarkData(options?:includingResourceValuesForKeys?:relativeTo?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "bookmarkData(options?:includingResourceValuesForKeys?:relativeTo?:)", "", "", "Argument[includingResourceValuesForKeys:].OptionalSome.CollectionElement", "ReturnValue", "taint", "manual"], + ["", "URL", true, "bookmarkData(options?:includingResourceValuesForKeys?:relativeTo?:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], ["", "URL", true, "bookmarkData(withContentsOf:)", "", "", "Argument[withContentsOf:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "deletingLastPathComponent()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "deletingPathExtension()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "fragment(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "fragment(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "homeDirectory(forUser:)", "", "", "Argument[forUser:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "host(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "host(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(_:isDirectory:)", "", "", "Argument[0]", "ReturnValue.OptionalSome", "taint", "manual"], - ["", "URL", true, "init(dataRepresentation:relativeTo:isAbsolute:)", "", "", "Argument[dataRepresentation:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(dataRepresentation:relativeTo:isAbsolute:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(dataRepresentation:relativeTo:isAbsolute?:)", "", "", "Argument[dataRepresentation:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(dataRepresentation:relativeTo:isAbsolute?:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(filePath:)", "", "", "Argument[filePath:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "URL", true, "init(filePath:directoryHint:)", "", "", "Argument[filePath:]", "ReturnValue.OptionalSome", "taint", "manual"], - ["", "URL", true, "init(filePath:directoryHint:relativeTo:)", "", "", "Argument[filePath:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(filePath:directoryHint:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(filePath:directoryHint?:relativeTo:)", "", "", "Argument[filePath:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(filePath:directoryHint?:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(filePath:isDirectory:)", "", "", "Argument[filePath:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "URL", true, "init(fileURLWithFileSystemRepresentation:isDirectory:relativeTo:)", "", "", "Argument[fileURLWithFileSystemRepresentation:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(fileURLWithFileSystemRepresentation:isDirectory:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], @@ -849,25 +849,25 @@ ["", "URL", true, "init(fileURLWithPath:isDirectory:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(fileURLWithPath:relativeTo:)", "", "", "Argument[fileURLWithPath:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(fileURLWithPath:relativeTo:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(for:in:appropriateFor:create:)", "", "", "Argument[for:,in:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(for:in:appropriateFor:create:)", "", "", "Argument[appropriateFor:].OptionalSome", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(resolvingAliasFileAt:options:)", "", "", "Argument[resolvingAliasFileAt:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)", "", "", "Argument[resolvingBookmarkData:]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(for:in:appropriateFor?:create?:)", "", "", "Argument[for:,in:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(for:in:appropriateFor?:create?:)", "", "", "Argument[appropriateFor:].OptionalSome", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(resolvingAliasFileAt:options?:)", "", "", "Argument[resolvingAliasFileAt:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(resolvingBookmarkData:options?:relativeTo?:bookmarkDataIsStale:)", "", "", "Argument[resolvingBookmarkData:]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "init(resolvingBookmarkData:options?:relativeTo?:bookmarkDataIsStale:)", "", "", "Argument[relativeTo:].OptionalSome", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(resource:)", "", "", "Argument[resource:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "init(string:encodingInvalidCharacters:)", "", "", "Argument[string:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "URL", true, "init(string:relativeTo:)", "(String,URL?)", "", "Argument[string:]", "ReturnValue.OptionalSome", "taint", "manual"], ["", "URL", true, "init(string:relativeTo:)", "(String,URL?)", "", "Argument[relativeTo:].OptionalSome", "ReturnValue.OptionalSome", "taint", "manual"], - ["", "URL", true, "password(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "path(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "password(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "path(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "promisedItemResourceValues(forKeys:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "URL", true, "query(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "query(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "resolvingSymlinksInPath()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "resourceValues(forKeys:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "resourceValues(forKeys:fromBookmarkData:)", "", "", "Argument[fromBookmarkData:]", "ReturnValue", "taint", "manual"], ["", "URL", true, "setResourceValues(_:)", "", "", "Argument[0]", "Argument[self]", "taint", "manual"], ["", "URL", true, "setTemporaryResourceValue(_:forKey:)", "", "", "Argument[self,0]", "Argument[self]", "taint", "manual"], - ["", "URL", true, "user(percentEncoded:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "URL", true, "user(percentEncoded?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URL", true, "withUnsafeFileSystemRepresentation(_:)", "", "", "Argument[self]", "Argument[0].Parameter[0].OptionalSome.CollectionElement", "taint", "manual"], ["", "URL", true, "withUnsafeFileSystemRepresentation(_:)", "", "", "Argument[0].ReturnValue", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(contentsOf:)", "", "", "Argument[contentsOf:]", "ReturnValue", "taint", "manual"], @@ -875,8 +875,8 @@ ["", "NSData", true, "init(contentsOf:options:)", "", "", "Argument[contentsOf:]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(data:)", "", "", "Argument[data:]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(bytes:length:)", "", "", "Argument[bytes:]", "ReturnValue", "taint", "manual"], - ["", "NSData", true, "base64EncodedData(options:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "NSData", true, "base64EncodedString(options:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSData", true, "base64EncodedData(options?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSData", true, "base64EncodedString(options?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "base64Encoding()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "compressed(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "dataWithContentsOfMappedFile(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], @@ -885,7 +885,7 @@ ["", "NSData", true, "getBytes(_:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSData", true, "getBytes(_:length:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSData", true, "getBytes(_:range:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], - ["", "NSData", true, "init(base64Encoded:options:)", "", "", "Argument[base64Encoded:]", "ReturnValue", "taint", "manual"], + ["", "NSData", true, "init(base64Encoded:options?:)", "", "", "Argument[base64Encoded:]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(base64Encoding:)", "", "", "Argument[base64Encoding:]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(bytesNoCopy:length:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], ["", "NSData", true, "init(bytesNoCopy:length:deallocator:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], @@ -895,7 +895,7 @@ ["", "NSData", true, "subdata(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "init(coder:)", "", "", "Argument[coder:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "init(cString:)", "", "", "Argument[cString:]", "ReturnValue", "taint", "manual"], - ["", "NSString", true, "getBytes(_:maxLength:usedLength:encoding:options:range:remaining:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], + ["", "NSString", true, "getBytes(_:maxLength:usedLength:encoding:options?:range:remaining:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "getCharacters(_:range:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "character(at:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "getCString(_:maxLength:encoding:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], @@ -927,17 +927,17 @@ ["", "NSString", true, "data(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "data(using:allowLossyConversion:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "enumerateLines(_:)", "", "", "Argument[self]", "Argument[0].Parameter[0]", "taint", "manual"], - ["", "NSString", true, "enumerateLinguisticTags(in:scheme:options:orthography:using:)", "", "", "Argument[self]", "Argument[using:].Parameter[0].OptionalSome", "taint", "manual"], - ["", "NSString", true, "enumerateSubstrings(in:options:using:)", "", "", "Argument[self]", "Argument[using:].Parameter[0].OptionalSome", "taint", "manual"], - ["", "NSString", true, "enumerateSubstrings(in:options:using:)", "", "", "Argument[using:].Parameter[0].OptionalSome", "Argument[self]", "taint", "manual"], - ["", "NSString", true, "folding(options:locale:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSString", true, "enumerateLinguisticTags(in:scheme:options?:orthography:using:)", "", "", "Argument[self]", "Argument[using:].Parameter[0].OptionalSome", "taint", "manual"], + ["", "NSString", true, "enumerateSubstrings(in:options?:using:)", "", "", "Argument[self]", "Argument[using:].Parameter[0].OptionalSome", "taint", "manual"], + ["", "NSString", true, "enumerateSubstrings(in:options?:using:)", "", "", "Argument[using:].Parameter[0].OptionalSome", "Argument[self]", "taint", "manual"], + ["", "NSString", true, "folding(options?:locale:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "getCString(_:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "getCString(_:maxLength:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "getCString(_:maxLength:range:remaining:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "getCharacters(_:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "getFileSystemRepresentation(_:maxLength:)", "", "", "Argument[self]", "Argument[0]", "taint", "manual"], ["", "NSString", true, "init(bytes:length:encoding:)", "", "", "Argument[bytes:]", "ReturnValue", "taint", "manual"], - ["", "NSString", true, "init(bytesNoCopy:length:encoding:deallocator:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], + ["", "NSString", true, "init(bytesNoCopy:length:encoding:deallocator?:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "init(bytesNoCopy:length:encoding:freeWhenDone:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "init(cString:encoding:)", "", "", "Argument[cString:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "init(cString:length:)", "", "", "Argument[cString:]", "ReturnValue", "taint", "manual"], @@ -967,8 +967,8 @@ ["", "NSString", true, "replacingCharacters(in:with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "replacingOccurrences(of:with:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "replacingOccurrences(of:with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "NSString", true, "replacingOccurrences(of:with:options:range:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], - ["", "NSString", true, "replacingOccurrences(of:with:options:range:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSString", true, "replacingOccurrences(of:with:options?:range:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], + ["", "NSString", true, "replacingOccurrences(of:with:options?:range:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "replacingPercentEscapes(using:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "string(withCString:)", "", "", "Argument[withCString:]", "ReturnValue", "taint", "manual"], ["", "NSString", true, "string(withCString:length:)", "", "", "Argument[withCString:]", "ReturnValue", "taint", "manual"], @@ -997,15 +997,15 @@ ["", "Data", true, "reduce(into:_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Data", true, "sorted()", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Data", true, "sorted(by:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Data", true, "replace(_:with:maxReplacements:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], - ["", "Data", true, "replacing(_:with:maxReplacements:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], - ["", "Data", true, "replacing(_:with:subrange:maxReplacements:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], + ["", "Data", true, "replace(_:with:maxReplacements?:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], + ["", "Data", true, "replacing(_:with:maxReplacements?:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], + ["", "Data", true, "replacing(_:with:subrange:maxReplacements?:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], ["", "Data", true, "trimmingPrefix(while:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Data", true, "trimmingPrefix(_:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "Data", true, "init(contentsOf:options:)", "", "", "Argument[contentsOf:]", "ReturnValue", "taint", "manual"], - ["", "Data", true, "base64EncodedData(options:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Data", true, "base64EncodedString(options:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], - ["", "Data", true, "init(base64Encoded:options:)", "", "", "Argument[base64Encoded:]", "ReturnValue", "taint", "manual"], + ["", "Data", true, "base64EncodedData(options?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Data", true, "base64EncodedString(options?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "Data", true, "init(base64Encoded:options?:)", "", "", "Argument[base64Encoded:]", "ReturnValue", "taint", "manual"], ["", "Data", true, "init(buffer:)", "", "", "Argument[buffer:]", "ReturnValue", "taint", "manual"], ["", "Data", true, "init(bytes:count:)", "", "", "Argument[bytes:]", "ReturnValue", "taint", "manual"], ["", "Data", true, "init(bytesNoCopy:count:deallocator:)", "", "", "Argument[bytesNoCopy:]", "ReturnValue", "taint", "manual"], @@ -1018,7 +1018,7 @@ ["", "Blob", true, "init(bytes:length:)", "", "", "Argument[bytes:]", "ReturnValue", "taint", "manual"], ["", "Expression", true, "init(_:_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "Expression", true, "init(_:_:)", "", "", "Argument[1].CollectionElement", "ReturnValue", "taint", "manual"], - ["", "NSCopying", true, "copy(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSCopying", true, "copy(with?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "ExpressionType", true, "init(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"], ["", "ExpressionType", true, "replace(_:with:)", "", "", "Argument[with:]", "ReturnValue", "taint", "manual"], ["", "InputStream", true, "init(data:)", "", "", "Argument[data:]", "ReturnValue", "taint", "manual"], @@ -1033,7 +1033,7 @@ ["", "NSURL", true, "appendingPathExtension(_:)", "", "", "Argument[self,0]", "ReturnValue", "taint", "manual"], ["", "NSURL", true, "appendingPathComponent(_:isDirectory:)", "", "", "Argument[self,0]", "ReturnValue", "taint", "manual"], ["", "NSURL", true, "appendingPathComponent(_:conformingTo:)", "", "", "Argument[self,0]", "ReturnValue", "taint", "manual"], - ["", "NSMutableCopying", true, "mutableCopy(with:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], + ["", "NSMutableCopying", true, "mutableCopy(with?:)", "", "", "Argument[self]", "ReturnValue", "taint", "manual"], ["", "URLSession", true, "dataTask(with:completionHandler:)", "", "", "Argument[with:]", "Argument[completionHandler:].Parameter[0]", "taint", "manual"], ["", "WKUserScript", true, "init(source:injectionTime:forMainFrameOnly:)", "", "", "Argument[source:]", "ReturnValue", "taint", "manual"], ["", "WKUserScript", true, "init(source:injectionTime:forMainFrameOnly:in:)", "", "", "Argument[source:]", "ReturnValue", "taint", "manual"], @@ -1100,13 +1100,13 @@ ["", "ContiguousBytes", true, "withUnsafeBytes(_:)", "", "", "Argument[self]", "Argument[0].Parameter[0].CollectionElement", "taint", "manual"], ["", "ContiguousBytes", true, "withUnsafeBytes(_:)", "", "", "Argument[self].CollectionElement", "Argument[0].Parameter[0].CollectionElement", "taint", "manual"], ["", "ContiguousBytes", true, "withUnsafeBytes(_:)", "", "", "Argument[0].ReturnValue", "ReturnValue", "value", "manual"], - ["", "URLResource", true, "init(name:subdirectory:locale:bundle:)", "", "", "Argument[name:,subdirectory:]", "ReturnValue", "taint", "manual"], + ["", "URLResource", true, "init(name:subdirectory?:locale?:bundle?:)", "", "", "Argument[name:,subdirectory:]", "ReturnValue", "taint", "manual"], ["", "NSMutableString", true, "append(_:)", "", "", "Argument[0]", "Argument[self]", "taint", "manual"], ["", "NSMutableString", true, "insert(_:at:)", "", "", "Argument[0]", "Argument[self]", "taint", "manual"], ["", "NSMutableString", true, "appendFormat(_:_:)", "", "", "Argument[0]", "Argument[self]", "taint", "manual"], ["", "NSMutableString", true, "appendFormat(_:_:)", "", "", "Argument[1].CollectionElement", "Argument[self]", "taint", "manual"], ["", "NSMutableString", true, "replaceCharacters(in:with:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], - ["", "NSMutableString", true, "replaceOccurrences(of:with:options:range:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], + ["", "NSMutableString", true, "replaceOccurrences(of:with:options?:range:)", "", "", "Argument[with:]", "Argument[self]", "taint", "manual"], ["", "NSMutableString", true, "setString(_:)", "", "", "Argument[0]", "Argument[self]", "taint", "manual"] ] } diff --git a/unified/ql/test/query-tests/security/CWE-022/PathInjection/PathInjectionTest.expected b/unified/ql/test/query-tests/security/CWE-022/PathInjection/PathInjectionTest.expected index 4f3a2b06c60d..ce9f52862a58 100644 --- a/unified/ql/test/query-tests/security/CWE-022/PathInjection/PathInjectionTest.expected +++ b/unified/ql/test/query-tests/security/CWE-022/PathInjection/PathInjectionTest.expected @@ -71,13 +71,20 @@ | testPathInjection.swift:443:32:443:43 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:443:32:443:43 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:445:33:445:44 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:445:33:445:44 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:447:40:447:51 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:447:40:447:51 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:449:38:449:49 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:449:38:449:49 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:451:38:451:49 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:451:38:451:49 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:453:38:453:49 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:453:38:453:49 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:456:15:456:26 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:456:15:456:26 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:463:38:463:46 | remoteUrl | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:463:38:463:46 | remoteUrl | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:465:43:465:51 | remoteUrl | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:465:43:465:51 | remoteUrl | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:469:5:469:18 | ... .fileURL | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:469:5:469:18 | ... .fileURL | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:471:5:471:23 | ... .seedFilePath | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:471:5:471:23 | ... .seedFilePath | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:482:22:482:33 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:482:22:482:33 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:484:24:484:30 | buffer2 | testPathInjection.swift:477:22:477:87 | Data(...) | testPathInjection.swift:484:24:484:30 | buffer2 | This path depends on a $@. | testPathInjection.swift:477:22:477:87 | Data(...) | user-provided value | | testPathInjection.swift:486:25:486:36 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:486:25:486:36 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:497:49:497:60 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:497:49:497:60 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:498:49:498:60 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:498:49:498:60 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | +| testPathInjection.swift:500:25:500:36 | remoteString | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:500:25:500:36 | remoteString | This path depends on a $@. | testPathInjection.swift:340:24:340:78 | String(...) | user-provided value | | testPathInjection.swift:502:26:502:36 | remoteData2 | testPathInjection.swift:501:23:501:75 | Data(...) | testPathInjection.swift:502:26:502:36 | remoteData2 | This path depends on a $@. | testPathInjection.swift:501:23:501:75 | Data(...) | user-provided value | | testPathInjection.swift:512:37:512:48 | remoteString | testPathInjection.swift:506:24:506:78 | String(...) | testPathInjection.swift:512:37:512:48 | remoteString | This path depends on a $@. | testPathInjection.swift:506:24:506:78 | String(...) | user-provided value | | testPathInjection.swift:514:33:514:44 | remoteString | testPathInjection.swift:506:24:506:78 | String(...) | testPathInjection.swift:514:33:514:44 | remoteString | This path depends on a $@. | testPathInjection.swift:506:24:506:78 | String(...) | user-provided value | @@ -148,10 +155,15 @@ edges | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:443:32:443:43 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:445:33:445:44 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:447:40:447:51 | remoteString | provenance | | +| testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:449:38:449:49 | remoteString | provenance | | +| testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:451:38:451:49 | remoteString | provenance | | +| testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:453:38:453:49 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:456:15:456:26 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:482:22:482:33 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:486:25:486:36 | remoteString | provenance | | +| testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:497:49:497:60 | remoteString | provenance | | | testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:498:49:498:60 | remoteString | provenance | | +| testPathInjection.swift:340:9:340:20 | remoteString | testPathInjection.swift:500:25:500:36 | remoteString | provenance | | | testPathInjection.swift:340:24:340:78 | String(...) | testPathInjection.swift:340:9:340:20 | remoteString | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:346:24:346:32 | remoteUrl | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:349:30:349:38 | remoteUrl | provenance | | @@ -176,6 +188,8 @@ edges | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:401:34:401:42 | remoteUrl | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:421:26:421:34 | remoteUrl | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:436:25:436:33 | remoteUrl | provenance | | +| testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:463:38:463:46 | remoteUrl | provenance | | +| testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:465:43:465:51 | remoteUrl | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:469:22:469:30 | remoteUrl | provenance | | | testPathInjection.swift:341:9:341:17 | remoteUrl | testPathInjection.swift:471:27:471:35 | remoteUrl | provenance | | | testPathInjection.swift:341:33:341:44 | remoteString | testPathInjection.swift:341:9:341:17 | remoteUrl | provenance | | @@ -318,7 +332,12 @@ nodes | testPathInjection.swift:443:32:443:43 | remoteString | semmle.label | remoteString | | testPathInjection.swift:445:33:445:44 | remoteString | semmle.label | remoteString | | testPathInjection.swift:447:40:447:51 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:449:38:449:49 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:451:38:451:49 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:453:38:453:49 | remoteString | semmle.label | remoteString | | testPathInjection.swift:456:15:456:26 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:463:38:463:46 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:465:43:465:51 | remoteUrl | semmle.label | remoteUrl | | testPathInjection.swift:469:5:469:18 | ... .fileURL | semmle.label | ... .fileURL | | testPathInjection.swift:469:22:469:30 | remoteUrl | semmle.label | remoteUrl | | testPathInjection.swift:471:5:471:23 | ... .seedFilePath | semmle.label | ... .seedFilePath | @@ -330,7 +349,9 @@ nodes | testPathInjection.swift:482:22:482:33 | remoteString | semmle.label | remoteString | | testPathInjection.swift:484:24:484:30 | buffer2 | semmle.label | buffer2 | | testPathInjection.swift:486:25:486:36 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:497:49:497:60 | remoteString | semmle.label | remoteString | | testPathInjection.swift:498:49:498:60 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:500:25:500:36 | remoteString | semmle.label | remoteString | | testPathInjection.swift:501:9:501:19 | remoteData2 | semmle.label | remoteData2 | | testPathInjection.swift:501:23:501:75 | Data(...) | semmle.label | Data(...) | | testPathInjection.swift:502:26:502:36 | remoteData2 | semmle.label | remoteData2 | diff --git a/unified/ql/test/query-tests/security/CWE-022/PathInjection/testPathInjection.swift b/unified/ql/test/query-tests/security/CWE-022/PathInjection/testPathInjection.swift index 16eea252c006..a7ef874c49e0 100644 --- a/unified/ql/test/query-tests/security/CWE-022/PathInjection/testPathInjection.swift +++ b/unified/ql/test/query-tests/security/CWE-022/PathInjection/testPathInjection.swift @@ -446,11 +446,11 @@ func test(buffer1: UnsafeMutablePointer, buffer2: UnsafeMutablePointer, buffer2: UnsafeMutablePointer, buffer2: UnsafeMutablePointer