Skip to content

Commit 22ed20d

Browse files
committed
Swift: Upgrade SecKeyCopyExternalRepresentation source to be considered a password / key rather than a miscellaneous credential.
1 parent 10b4c98 commit 22ed20d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ private import codeql.swift.dataflow.ExternalFlow
88

99
private class SensitiveSources extends SourceModelCsv {
1010
override predicate row(string row) {
11-
row = ";;false;SecKeyCopyExternalRepresentation(_:_:);;;ReturnValue;sensitive-credential"
11+
row = ";;false;SecKeyCopyExternalRepresentation(_:_:);;;ReturnValue;sensitive-password"
1212
}
1313
}

swift/ql/test/query-tests/Security/CWE-311/SensitiveExprs.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,4 @@
175175
| testURL.swift:73:52:73:67 | call to get_secret_key() | label:get_secret_key, type:credential |
176176
| testURL.swift:75:53:75:69 | call to get_cert_string() | label:get_cert_string, type:credential |
177177
| testURL.swift:96:51:96:51 | certificate | label:certificate, type:credential |
178-
| testURL.swift:104:16:104:57 | call to SecKeyCopyExternalRepresentation(_:_:) | label:credential, type:credential |
178+
| testURL.swift:104:16:104:57 | call to SecKeyCopyExternalRepresentation(_:_:) | label:password, type:password |

0 commit comments

Comments
 (0)