diff --git a/unified/ql/lib/ext/legacy-swift.model.json b/unified/ql/lib/ext/legacy-swift.model.json index c8260c926b96..aeeaaba6bb9b 100644 --- a/unified/ql/lib/ext/legacy-swift.model.json +++ b/unified/ql/lib/ext/legacy-swift.model.json @@ -261,10 +261,10 @@ ["", "SHA384.Type", true, "hash(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA384", "manual"], ["", "SHA384", true, "update(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA384", "manual"], ["", "SHA384", true, "update(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA384", "manual"], - ["", "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, "callAsFunction(_:)", "", "", "Argument[0]", "weak-password-hash-input-SHA3", "manual"], + ["", "SHA3", true, "calculate(for:)", "", "", "Argument[for:]", "weak-password-hash-input-SHA3", "manual"], + ["", "SHA3", true, "process(block:currentHash:)", "", "", "Argument[block:]", "weak-password-hash-input-SHA3", "manual"], + ["", "SHA3", true, "update(withBytes:isLast?:)", "", "", "Argument[withBytes:]", "weak-password-hash-input-SHA3", "manual"], ["", "SHA512.Type", true, "hash(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA512", "manual"], ["", "SHA512.Type", true, "hash(data:)", "", "", "Argument[data:]", "weak-password-hash-input-SHA512", "manual"], ["", "SHA512", true, "update(bufferPointer:)", "", "", "Argument[bufferPointer:]", "weak-password-hash-input-SHA512", "manual"], diff --git a/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.qhelp b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.qhelp new file mode 100644 index 000000000000..390c5b12fa64 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.qhelp @@ -0,0 +1,95 @@ + + + +

+ Hash functions that are not sufficiently computationally hard can leave data vulnerable. You should not use such functions for password hashing. +

+ +

+ A strong cryptographic hash function should be resistant to: +

+ + +

+ All of MD5, SHA-1, SHA-2 and SHA-3 are weak against offline brute forcing, since they are not sufficiently computationally hard. This includes SHA-224, SHA-256, SHA-384 and SHA-512, which are in the SHA-2 family. +

+ +

+ Password hashing algorithms should be slow and/or memory intensive to compute, to make brute force attacks more difficult. +

+ +
+ + +

+ For password storage, you should use a sufficiently computationally hard cryptographic hash function, such as one of the following: +

+ + + +
+ + +

+ The following examples show two versions of the same function. In both cases, a password is hashed using a cryptographic hashing algorithm. + + In the first case, the SHA-512 hashing algorithm is used. It is vulnerable to offline brute force attacks: +

+ +

+ + Here is the same function using Argon2, which is suitable for password hashing: +

+ + +
+ +
  • + OWASP: + Password Storage + Cheat Sheet + +
  • +
  • + GitHub: CryptoSwift README - Password-Based Key Derivation Function +
  • +
  • + libsodium: libsodium bindings for other languages +
  • +
  • + GitHub: Argon2Swift +
  • +
    + +
    diff --git a/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.ql b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.ql new file mode 100644 index 000000000000..295708c0c794 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashing.ql @@ -0,0 +1,79 @@ +/** + * @name Use of an inappropriate cryptographic hashing algorithm on passwords + * @description Using inappropriate cryptographic hashing algorithms with passwords can compromise security. + * @kind path-problem + * @problem.severity warning + * @security-severity 7.5 + * @precision high + * @id unified/swift/weak-password-hashing + * @tags security + * external/cwe/cwe-327 + * external/cwe/cwe-328 + * external/cwe/cwe-916 + */ + +import unified +import codeql.unified.security.SensitiveData + +/** + * Holds if `node` is a sink for weak password hashing using `algorithm`. + */ +private predicate isWeakPasswordHashingSink(DataFlow::Node node, string algorithm) { + exists(string kind | Models::isSink(node, kind) | + // match the following sinks: + // - `weak-hash-input-` (sinks that apply to both this query and `unified/swift/weak-sensitive-data-hashing`) + // - `weak-password-hash-input-` (sinks that apply to just this query) + algorithm = kind.regexpCapture("weak-(?:password-)?hash-input-(.+)", 1) + ) +} + +/** + * A taint tracking configuration from password expressions to inappropriate + * hashing sinks. + */ +module WeakPasswordHashingConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node node) { + node.(SensitiveData).getClassification() = SensitiveDataClassification::password() + } + + predicate isSink(DataFlow::Node node) { isWeakPasswordHashingSink(node, _) } + + predicate isBarrier(DataFlow::Node node) { + // A barrier for weak password hashing, when it occurs inside of + // certain cryptographic algorithms as part of their design. + exists(ClassLikeDeclaration cls, string name | + node.asExpr().getParent+() = cls and + ( + name = cls.resolve().getName() + or + name = cls.getExtensionTarget().(Identifier).getValue() + ) and + name = ["HMAC", "PBKDF1", "PBKDF2"] + ) + } + + predicate isBarrierIn(DataFlow::Node node) { + // make sources barriers so that we only report the closest instance + isSource(node) + } + + predicate isBarrierOut(DataFlow::Node node) { + // make sinks barriers so that we only report the closest instance + isSink(node) + } + + predicate observeDiffInformedIncrementalMode() { any() } +} + +module WeakPasswordHashingFlow = TaintTracking::Global; + +import WeakPasswordHashingFlow::PathGraph + +from + WeakPasswordHashingFlow::PathNode source, WeakPasswordHashingFlow::PathNode sink, string algorithm +where + WeakPasswordHashingFlow::flowPath(source, sink) and + isWeakPasswordHashingSink(sink.getNode(), algorithm) +select sink.getNode(), source, sink, + "Insecure hashing algorithm (" + algorithm + ") depends on $@.", source.getNode(), + "password (" + source.getNode().toString() + ")" diff --git a/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingBad.swift b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingBad.swift new file mode 100644 index 000000000000..572fe9fa3605 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingBad.swift @@ -0,0 +1,8 @@ +let passwordData = Data(passwordString.utf8) +let passwordHash = Crypto.SHA512.hash(data: passwordData) // BAD: SHA-512 is not suitable for password hashing. + +// ... + +if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { + // ... +} diff --git a/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingGood.swift b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingGood.swift new file mode 100644 index 000000000000..ed2c8758674c --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakPasswordHashingGood.swift @@ -0,0 +1,11 @@ +import Argon2Swift + +let salt = Salt.newSalt() +let result = try! Argon2Swift.hashPasswordString(password: passwordString, salt: salt) // GOOD: Argon2 is suitable for password hashing. +let passwordHash = result.encodedString() + +// ... + +if try! Argon2Swift.verifyHashString(password: passwordString, hash: passwordHash) { + // ... +} diff --git a/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.qhelp b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.qhelp new file mode 100644 index 000000000000..54a16ed29405 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.qhelp @@ -0,0 +1,91 @@ + + + +

    + Using a broken or weak cryptographic hash function can leave data + vulnerable, and should not be used in security related code. +

    + +

    + A strong cryptographic hash function should be resistant to: +

    +
      +
    • + Pre-image attacks. If you know a hash value h(x), + you should not be able to easily find the input x. +
    • +
    • + Collision attacks. If you know a hash value h(x), + you should not be able to easily find a different input + y + with the same hash value h(x) = h(y). +
    • +
    + +

    + As an example, both MD5 and SHA-1 are known to be vulnerable to collision attacks. +

    + +

    + Since it's OK to use a weak cryptographic hash function in a non-security + context, this query only alerts when these are used to hash sensitive + data (such as usernames, identifying information and private data). +

    + +
    + + +

    + Ensure that you use a strong, modern cryptographic hash function, such as: +

    + +
      +
    • + Argon2, scrypt, bcrypt, or PBKDF2 for passwords and other data with limited input space where + a dictionary-like attack is feasible. +
    • +
    • + SHA-2, or SHA-3 in other cases. +
    • +
    + +

    + Note that special purpose algorithms, which are used to ensure that a message comes from a particular sender, exist for message authentication. These algorithms should be used when appropriate, as they address common vulnerabilities of simple hashing schemes in this context. +

    + +
    + + +

    + The following examples show a function for fetching data from a + URL and computing a hash of the data, perhaps to check the data has + not been tampered with. +

    + +

    + In the first case the MD5 hashing algorithm is used that is known to be vulnerable to collision attacks. +

    + + +

    + Here is the same function using SHA-512, which is a strong cryptographic hashing function. +

    + + +
    + +
  • + OWASP: + Password Storage + Cheat Sheet + + and + + Transport Layer Security Cheat Sheet + +
  • +
    + +
    diff --git a/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql new file mode 100644 index 000000000000..effc162b5410 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashing.ql @@ -0,0 +1,64 @@ +/** + * @name Use of a broken or weak cryptographic hashing algorithm on sensitive data + * @description Using broken or weak cryptographic hashing algorithms can compromise security. + * @kind path-problem + * @problem.severity warning + * @security-severity 7.5 + * @precision high + * @id unified/swift/weak-sensitive-data-hashing + * @tags security + * external/cwe/cwe-327 + * external/cwe/cwe-328 + */ + +import unified +import codeql.unified.security.SensitiveData + +/** + * Holds if `node` is a sink for weak sensitive data hashing using `algorithm`. + */ +private predicate isWeakSensitiveDataHashingSink(DataFlow::Node node, string algorithm) { + exists(string kind | Models::isSink(node, kind) | + algorithm = kind.regexpCapture("weak-hash-input-(.+)", 1) + ) +} + +/** + * A taint tracking configuration from sensitive expressions to broken or weak + * hashing sinks. + */ +module WeakSensitiveDataHashingConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node node) { + node instanceof SensitiveData and + not node.(SensitiveData).getClassification() = SensitiveDataClassification::password() // responsibility of the weak password hashing query + } + + predicate isSink(DataFlow::Node node) { isWeakSensitiveDataHashingSink(node, _) } + + predicate isBarrierIn(DataFlow::Node node) { + // make sources barriers so that we only report the closest instance + isSource(node) + } + + predicate isBarrierOut(DataFlow::Node node) { + // make sinks barriers so that we only report the closest instance + isSink(node) + } + + predicate observeDiffInformedIncrementalMode() { any() } +} + +module WeakSensitiveDataHashingFlow = TaintTracking::Global; + +import WeakSensitiveDataHashingFlow::PathGraph + +from + WeakSensitiveDataHashingFlow::PathNode source, WeakSensitiveDataHashingFlow::PathNode sink, + string algorithm, SensitiveData sensitiveData +where + WeakSensitiveDataHashingFlow::flowPath(source, sink) and + isWeakSensitiveDataHashingSink(sink.getNode(), algorithm) and + sensitiveData = source.getNode() +select sink.getNode(), source, sink, + "Insecure hashing algorithm (" + algorithm + ") depends on $@.", source.getNode(), + "sensitive data (" + sensitiveData.getClassification() + " " + sensitiveData.toString() + ")" diff --git a/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingBad.swift b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingBad.swift new file mode 100644 index 000000000000..31f655589142 --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingBad.swift @@ -0,0 +1,10 @@ +func getContentsAndHash(url: URL) -> (Data, String)? { + guard let data = try? Data(contentsOf: url) else { + return nil + } + + let digest = Insecure.MD5.hash(data: data) // BAD: MD5 is not suitable for hashing sensitive data. + let hash = digest.map { String(format: "%02hhx", $0) }.joined() + + return (data, hash) +} diff --git a/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingGood.swift b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingGood.swift new file mode 100644 index 000000000000..38c23a5c0dfe --- /dev/null +++ b/unified/ql/src/queries/security/CWE-328/WeakSensitiveDataHashingGood.swift @@ -0,0 +1,10 @@ +func getContentsAndHash(url: URL) -> (Data, String)? { + guard let data = try? Data(contentsOf: url) else { + return nil + } + + let digest = SHA512.hash(data: data) // GOOD: SHA-512 is suitable for hashing sensitive data. + let hash = digest.map { String(format: "%02hhx", $0) }.joined() + + return (data, hash) +} diff --git a/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.expected b/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.expected new file mode 100644 index 000000000000..b0483b35d6ee --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.expected @@ -0,0 +1,262 @@ +#select +| testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:84:47:84:52 | passwd | password (passwd) | +| testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:84:47:84:52 | passwd | password (passwd) | +| testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:84:47:84:52 | passwd | password (passwd) | +| testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:84:47:84:52 | passwd | password (passwd) | +| testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | testCryptoKit.swift:84:47:84:52 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:84:47:84:52 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:85:52:85:57 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:85:52:85:57 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:85:52:85:57 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:85:52:85:57 | passwd | password (passwd) | +| testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | testCryptoKit.swift:85:52:85:57 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:85:52:85:57 | passwd | password (passwd) | +| testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:91:36:91:41 | passwd | password (passwd) | +| testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:91:36:91:41 | passwd | password (passwd) | +| testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:91:36:91:41 | passwd | password (passwd) | +| testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:91:36:91:41 | passwd | password (passwd) | +| testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | testCryptoKit.swift:91:36:91:41 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:91:36:91:41 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:92:45:92:50 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:92:45:92:50 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:92:45:92:50 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:92:45:92:50 | passwd | password (passwd) | +| testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | testCryptoKit.swift:92:45:92:50 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:92:45:92:50 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:98:44:98:49 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:98:44:98:49 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:98:44:98:49 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:98:44:98:49 | passwd | password (passwd) | +| testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | testCryptoKit.swift:98:44:98:49 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:98:44:98:49 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:99:53:99:58 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:99:53:99:58 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:99:53:99:58 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:99:53:99:58 | passwd | password (passwd) | +| testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | testCryptoKit.swift:99:53:99:58 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:99:53:99:58 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:105:37:105:42 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:105:37:105:42 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:105:37:105:42 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:105:37:105:42 | passwd | password (passwd) | +| testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | testCryptoKit.swift:105:37:105:42 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:105:37:105:42 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:106:46:106:51 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:106:46:106:51 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:106:46:106:51 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:106:46:106:51 | passwd | password (passwd) | +| testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | testCryptoKit.swift:106:46:106:51 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:106:46:106:51 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:112:37:112:42 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:112:37:112:42 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:112:37:112:42 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:112:37:112:42 | passwd | password (passwd) | +| testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | testCryptoKit.swift:112:37:112:42 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:112:37:112:42 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:113:46:113:51 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:113:46:113:51 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:113:46:113:51 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:113:46:113:51 | passwd | password (passwd) | +| testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | testCryptoKit.swift:113:46:113:51 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:113:46:113:51 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:119:37:119:42 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:119:37:119:42 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:119:37:119:42 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:119:37:119:42 | passwd | password (passwd) | +| testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | testCryptoKit.swift:119:37:119:42 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:119:37:119:42 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:120:46:120:51 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:120:46:120:51 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:120:46:120:51 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:120:46:120:51 | passwd | password (passwd) | +| testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | testCryptoKit.swift:120:46:120:51 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:120:46:120:51 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:129:23:129:28 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:129:23:129:28 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:129:23:129:28 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:129:23:129:28 | passwd | password (passwd) | +| testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | testCryptoKit.swift:129:23:129:28 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:129:23:129:28 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:138:23:138:28 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:138:23:138:28 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:138:23:138:28 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:138:23:138:28 | passwd | password (passwd) | +| testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | testCryptoKit.swift:138:23:138:28 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:138:23:138:28 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:147:23:147:28 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:147:23:147:28 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:147:23:147:28 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:147:23:147:28 | passwd | password (passwd) | +| testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | testCryptoKit.swift:147:23:147:28 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:147:23:147:28 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:156:23:156:28 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:156:23:156:28 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:156:23:156:28 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:156:23:156:28 | passwd | password (passwd) | +| testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | testCryptoKit.swift:156:23:156:28 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:156:23:156:28 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:165:23:165:28 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:165:23:165:28 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:165:23:165:28 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:165:23:165:28 | passwd | password (passwd) | +| testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | testCryptoKit.swift:165:23:165:28 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:165:23:165:28 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:174:32:174:37 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:174:32:174:37 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:174:32:174:37 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:174:32:174:37 | passwd | password (passwd) | +| testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | testCryptoKit.swift:174:32:174:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:174:32:174:37 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:183:32:183:37 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:183:32:183:37 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:183:32:183:37 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:183:32:183:37 | passwd | password (passwd) | +| testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | testCryptoKit.swift:183:32:183:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:183:32:183:37 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:192:32:192:37 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:192:32:192:37 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:192:32:192:37 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:192:32:192:37 | passwd | password (passwd) | +| testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | testCryptoKit.swift:192:32:192:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:192:32:192:37 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:201:32:201:37 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:201:32:201:37 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:201:32:201:37 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:201:32:201:37 | passwd | password (passwd) | +| testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | testCryptoKit.swift:201:32:201:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:201:32:201:37 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:210:32:210:37 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:210:32:210:37 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:210:32:210:37 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:210:32:210:37 | passwd | password (passwd) | +| testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | testCryptoKit.swift:210:32:210:37 | passwd | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:210:32:210:37 | passwd | password (passwd) | +| testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:220:49:220:60 | passwordData | password (passwordData) | +| testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:220:49:220:60 | passwordData | password (passwordData) | +| testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:220:49:220:60 | passwordData | password (passwordData) | +| testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:220:49:220:60 | passwordData | password (passwordData) | +| testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | testCryptoKit.swift:220:49:220:60 | passwordData | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:220:49:220:60 | passwordData | password (passwordData) | +| testCryptoKit.swift:224:33:224:57 | Data(...) | testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:33:224:57 | Data(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:224:38:224:51 | passwordString | password (passwordString) | +| testCryptoKit.swift:224:33:224:57 | Data(...) | testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:33:224:57 | Data(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:224:38:224:51 | passwordString | password (passwordString) | +| testCryptoKit.swift:224:33:224:57 | Data(...) | testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:33:224:57 | Data(...) | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:224:38:224:51 | passwordString | password (passwordString) | +| testCryptoKit.swift:224:33:224:57 | Data(...) | testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:33:224:57 | Data(...) | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:224:38:224:51 | passwordString | password (passwordString) | +| testCryptoKit.swift:224:33:224:57 | Data(...) | testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:33:224:57 | Data(...) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:224:38:224:51 | passwordString | password (passwordString) | +| testCryptoKit.swift:251:39:251:44 | value7 | testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:251:39:251:44 | value7 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:249:23:249:36 | passwordString | password (passwordString) | +| testCryptoKit.swift:251:39:251:44 | value7 | testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:251:39:251:44 | value7 | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:249:23:249:36 | passwordString | password (passwordString) | +| testCryptoKit.swift:251:39:251:44 | value7 | testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:251:39:251:44 | value7 | Insecure hashing algorithm (SHA256) depends on $@. | testCryptoKit.swift:249:23:249:36 | passwordString | password (passwordString) | +| testCryptoKit.swift:251:39:251:44 | value7 | testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:251:39:251:44 | value7 | Insecure hashing algorithm (SHA384) depends on $@. | testCryptoKit.swift:249:23:249:36 | passwordString | password (passwordString) | +| testCryptoKit.swift:251:39:251:44 | value7 | testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:251:39:251:44 | value7 | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoKit.swift:249:23:249:36 | passwordString | password (passwordString) | +| testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:154:30:154:40 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:154:30:154:40 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:154:30:154:40 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | testCryptoSwift.swift:154:30:154:40 | passwdArray | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:154:30:154:40 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:157:31:157:41 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:157:31:157:41 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:157:31:157:41 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | testCryptoSwift.swift:157:31:157:41 | passwdArray | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:157:31:157:41 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:160:47:160:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:160:47:160:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:160:47:160:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | testCryptoSwift.swift:160:47:160:57 | passwdArray | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:160:47:160:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:163:47:163:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:163:47:163:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:163:47:163:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | testCryptoSwift.swift:163:47:163:57 | passwdArray | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:163:47:163:57 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:167:20:167:30 | passwdArray | testCryptoSwift.swift:167:20:167:30 | passwdArray | testCryptoSwift.swift:167:20:167:30 | passwdArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:167:20:167:30 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:170:21:170:31 | passwdArray | testCryptoSwift.swift:170:21:170:31 | passwdArray | testCryptoSwift.swift:170:21:170:31 | passwdArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:170:21:170:31 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:173:23:173:33 | passwdArray | testCryptoSwift.swift:173:23:173:33 | passwdArray | testCryptoSwift.swift:173:23:173:33 | passwdArray | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoSwift.swift:173:23:173:33 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:176:21:176:31 | passwdArray | testCryptoSwift.swift:176:21:176:31 | passwdArray | testCryptoSwift.swift:176:21:176:31 | passwdArray | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:176:21:176:31 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:179:21:179:31 | passwdArray | testCryptoSwift.swift:179:21:179:31 | passwdArray | testCryptoSwift.swift:179:21:179:31 | passwdArray | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:179:21:179:31 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:183:9:183:25 | [self arg] ... .md5(...) | testCryptoSwift.swift:183:9:183:19 | passwdArray | testCryptoSwift.swift:183:9:183:25 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:183:9:183:19 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:186:9:186:26 | [self arg] ... .sha1(...) | testCryptoSwift.swift:186:9:186:19 | passwdArray | testCryptoSwift.swift:186:9:186:26 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:186:9:186:19 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:189:9:189:28 | [self arg] ... .sha512(...) | testCryptoSwift.swift:189:9:189:19 | passwdArray | testCryptoSwift.swift:189:9:189:28 | [self arg] ... .sha512(...) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoSwift.swift:189:9:189:19 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:192:9:192:33 | [self arg] ... .sha2(...) | testCryptoSwift.swift:192:9:192:19 | passwdArray | testCryptoSwift.swift:192:9:192:33 | [self arg] ... .sha2(...) | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:192:9:192:19 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:195:9:195:33 | [self arg] ... .sha3(...) | testCryptoSwift.swift:195:9:195:19 | passwdArray | testCryptoSwift.swift:195:9:195:33 | [self arg] ... .sha3(...) | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:195:9:195:19 | passwdArray | password (passwdArray) | +| testCryptoSwift.swift:201:9:201:24 | [self arg] ... .md5(...) | testCryptoSwift.swift:201:9:201:18 | passwdData | testCryptoSwift.swift:201:9:201:24 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:201:9:201:18 | passwdData | password (passwdData) | +| testCryptoSwift.swift:204:9:204:25 | [self arg] ... .sha1(...) | testCryptoSwift.swift:204:9:204:18 | passwdData | testCryptoSwift.swift:204:9:204:25 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:204:9:204:18 | passwdData | password (passwdData) | +| testCryptoSwift.swift:207:9:207:27 | [self arg] ... .sha512(...) | testCryptoSwift.swift:207:9:207:18 | passwdData | testCryptoSwift.swift:207:9:207:27 | [self arg] ... .sha512(...) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoSwift.swift:207:9:207:18 | passwdData | password (passwdData) | +| testCryptoSwift.swift:210:9:210:32 | [self arg] ... .sha2(...) | testCryptoSwift.swift:210:9:210:18 | passwdData | testCryptoSwift.swift:210:9:210:32 | [self arg] ... .sha2(...) | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:210:9:210:18 | passwdData | password (passwdData) | +| testCryptoSwift.swift:213:9:213:32 | [self arg] ... .sha3(...) | testCryptoSwift.swift:213:9:213:18 | passwdData | testCryptoSwift.swift:213:9:213:32 | [self arg] ... .sha3(...) | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:213:9:213:18 | passwdData | password (passwdData) | +| testCryptoSwift.swift:219:9:219:20 | [self arg] ... .md5(...) | testCryptoSwift.swift:219:9:219:14 | passwd | testCryptoSwift.swift:219:9:219:20 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:219:9:219:14 | passwd | password (passwd) | +| testCryptoSwift.swift:222:9:222:21 | [self arg] ... .sha1(...) | testCryptoSwift.swift:222:9:222:14 | passwd | testCryptoSwift.swift:222:9:222:21 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:222:9:222:14 | passwd | password (passwd) | +| testCryptoSwift.swift:225:9:225:23 | [self arg] ... .sha512(...) | testCryptoSwift.swift:225:9:225:14 | passwd | testCryptoSwift.swift:225:9:225:23 | [self arg] ... .sha512(...) | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoSwift.swift:225:9:225:14 | passwd | password (passwd) | +| testCryptoSwift.swift:228:9:228:28 | [self arg] ... .sha2(...) | testCryptoSwift.swift:228:9:228:14 | passwd | testCryptoSwift.swift:228:9:228:28 | [self arg] ... .sha2(...) | Insecure hashing algorithm (SHA2) depends on $@. | testCryptoSwift.swift:228:9:228:14 | passwd | password (passwd) | +| testCryptoSwift.swift:231:9:231:28 | [self arg] ... .sha3(...) | testCryptoSwift.swift:231:9:231:14 | passwd | testCryptoSwift.swift:231:9:231:28 | [self arg] ... .sha3(...) | Insecure hashing algorithm (SHA3) depends on $@. | testCryptoSwift.swift:231:9:231:14 | passwd | password (passwd) | +| testCryptoSwift.swift:248:30:248:34 | bytes | testCryptoSwift.swift:255:36:255:46 | passwdArray | testCryptoSwift.swift:248:30:248:34 | bytes | Insecure hashing algorithm (SHA512) depends on $@. | testCryptoSwift.swift:255:36:255:46 | passwdArray | password (passwdArray) | +edges +| testCryptoKit.swift:224:38:224:51 | passwordString | testCryptoKit.swift:224:38:224:56 | ... .utf8 | provenance | | +| testCryptoKit.swift:224:38:224:56 | ... .utf8 | testCryptoKit.swift:224:33:224:57 | Data(...) | provenance | | +| testCryptoKit.swift:249:9:249:14 | value7 | testCryptoKit.swift:251:39:251:44 | value7 | provenance | | +| testCryptoKit.swift:249:18:249:42 | Data(...) | testCryptoKit.swift:249:9:249:14 | value7 | provenance | | +| testCryptoKit.swift:249:23:249:36 | passwordString | testCryptoKit.swift:249:23:249:41 | ... .utf8 | provenance | | +| testCryptoKit.swift:249:23:249:41 | ... .utf8 | testCryptoKit.swift:249:18:249:42 | Data(...) | provenance | | +| testCryptoSwift.swift:183:9:183:19 | passwdArray | testCryptoSwift.swift:183:9:183:25 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:186:9:186:19 | passwdArray | testCryptoSwift.swift:186:9:186:26 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:189:9:189:19 | passwdArray | testCryptoSwift.swift:189:9:189:28 | [self arg] ... .sha512(...) | provenance | | +| testCryptoSwift.swift:192:9:192:19 | passwdArray | testCryptoSwift.swift:192:9:192:33 | [self arg] ... .sha2(...) | provenance | | +| testCryptoSwift.swift:195:9:195:19 | passwdArray | testCryptoSwift.swift:195:9:195:33 | [self arg] ... .sha3(...) | provenance | | +| testCryptoSwift.swift:201:9:201:18 | passwdData | testCryptoSwift.swift:201:9:201:24 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:204:9:204:18 | passwdData | testCryptoSwift.swift:204:9:204:25 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:207:9:207:18 | passwdData | testCryptoSwift.swift:207:9:207:27 | [self arg] ... .sha512(...) | provenance | | +| testCryptoSwift.swift:210:9:210:18 | passwdData | testCryptoSwift.swift:210:9:210:32 | [self arg] ... .sha2(...) | provenance | | +| testCryptoSwift.swift:213:9:213:18 | passwdData | testCryptoSwift.swift:213:9:213:32 | [self arg] ... .sha3(...) | provenance | | +| testCryptoSwift.swift:219:9:219:14 | passwd | testCryptoSwift.swift:219:9:219:20 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:222:9:222:14 | passwd | testCryptoSwift.swift:222:9:222:21 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:225:9:225:14 | passwd | testCryptoSwift.swift:225:9:225:23 | [self arg] ... .sha512(...) | provenance | | +| testCryptoSwift.swift:228:9:228:14 | passwd | testCryptoSwift.swift:228:9:228:28 | [self arg] ... .sha2(...) | provenance | | +| testCryptoSwift.swift:231:9:231:14 | passwd | testCryptoSwift.swift:231:9:231:28 | [self arg] ... .sha3(...) | provenance | | +| testCryptoSwift.swift:247:24:247:28 | bytes | testCryptoSwift.swift:248:30:248:34 | bytes | provenance | | +| testCryptoSwift.swift:255:36:255:46 | passwdArray | testCryptoSwift.swift:247:24:247:28 | bytes | provenance | | +nodes +| testCryptoKit.swift:84:47:84:52 | passwd | semmle.label | passwd | +| testCryptoKit.swift:85:52:85:57 | passwd | semmle.label | passwd | +| testCryptoKit.swift:91:36:91:41 | passwd | semmle.label | passwd | +| testCryptoKit.swift:92:45:92:50 | passwd | semmle.label | passwd | +| testCryptoKit.swift:98:44:98:49 | passwd | semmle.label | passwd | +| testCryptoKit.swift:99:53:99:58 | passwd | semmle.label | passwd | +| testCryptoKit.swift:105:37:105:42 | passwd | semmle.label | passwd | +| testCryptoKit.swift:106:46:106:51 | passwd | semmle.label | passwd | +| testCryptoKit.swift:112:37:112:42 | passwd | semmle.label | passwd | +| testCryptoKit.swift:113:46:113:51 | passwd | semmle.label | passwd | +| testCryptoKit.swift:119:37:119:42 | passwd | semmle.label | passwd | +| testCryptoKit.swift:120:46:120:51 | passwd | semmle.label | passwd | +| testCryptoKit.swift:129:23:129:28 | passwd | semmle.label | passwd | +| testCryptoKit.swift:138:23:138:28 | passwd | semmle.label | passwd | +| testCryptoKit.swift:147:23:147:28 | passwd | semmle.label | passwd | +| testCryptoKit.swift:156:23:156:28 | passwd | semmle.label | passwd | +| testCryptoKit.swift:165:23:165:28 | passwd | semmle.label | passwd | +| testCryptoKit.swift:174:32:174:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:183:32:183:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:192:32:192:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:201:32:201:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:210:32:210:37 | passwd | semmle.label | passwd | +| testCryptoKit.swift:220:49:220:60 | passwordData | semmle.label | passwordData | +| testCryptoKit.swift:224:33:224:57 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:224:38:224:51 | passwordString | semmle.label | passwordString | +| testCryptoKit.swift:224:38:224:56 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:249:9:249:14 | value7 | semmle.label | value7 | +| testCryptoKit.swift:249:18:249:42 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:249:23:249:36 | passwordString | semmle.label | passwordString | +| testCryptoKit.swift:249:23:249:41 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:251:39:251:44 | value7 | semmle.label | value7 | +| testCryptoSwift.swift:154:30:154:40 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:157:31:157:41 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:160:47:160:57 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:163:47:163:57 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:167:20:167:30 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:170:21:170:31 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:173:23:173:33 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:176:21:176:31 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:179:21:179:31 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:183:9:183:19 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:183:9:183:25 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:186:9:186:19 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:186:9:186:26 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:189:9:189:19 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:189:9:189:28 | [self arg] ... .sha512(...) | semmle.label | [self arg] ... .sha512(...) | +| testCryptoSwift.swift:192:9:192:19 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:192:9:192:33 | [self arg] ... .sha2(...) | semmle.label | [self arg] ... .sha2(...) | +| testCryptoSwift.swift:195:9:195:19 | passwdArray | semmle.label | passwdArray | +| testCryptoSwift.swift:195:9:195:33 | [self arg] ... .sha3(...) | semmle.label | [self arg] ... .sha3(...) | +| testCryptoSwift.swift:201:9:201:18 | passwdData | semmle.label | passwdData | +| testCryptoSwift.swift:201:9:201:24 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:204:9:204:18 | passwdData | semmle.label | passwdData | +| testCryptoSwift.swift:204:9:204:25 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:207:9:207:18 | passwdData | semmle.label | passwdData | +| testCryptoSwift.swift:207:9:207:27 | [self arg] ... .sha512(...) | semmle.label | [self arg] ... .sha512(...) | +| testCryptoSwift.swift:210:9:210:18 | passwdData | semmle.label | passwdData | +| testCryptoSwift.swift:210:9:210:32 | [self arg] ... .sha2(...) | semmle.label | [self arg] ... .sha2(...) | +| testCryptoSwift.swift:213:9:213:18 | passwdData | semmle.label | passwdData | +| testCryptoSwift.swift:213:9:213:32 | [self arg] ... .sha3(...) | semmle.label | [self arg] ... .sha3(...) | +| testCryptoSwift.swift:219:9:219:14 | passwd | semmle.label | passwd | +| testCryptoSwift.swift:219:9:219:20 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:222:9:222:14 | passwd | semmle.label | passwd | +| testCryptoSwift.swift:222:9:222:21 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:225:9:225:14 | passwd | semmle.label | passwd | +| testCryptoSwift.swift:225:9:225:23 | [self arg] ... .sha512(...) | semmle.label | [self arg] ... .sha512(...) | +| testCryptoSwift.swift:228:9:228:14 | passwd | semmle.label | passwd | +| testCryptoSwift.swift:228:9:228:28 | [self arg] ... .sha2(...) | semmle.label | [self arg] ... .sha2(...) | +| testCryptoSwift.swift:231:9:231:14 | passwd | semmle.label | passwd | +| testCryptoSwift.swift:231:9:231:28 | [self arg] ... .sha3(...) | semmle.label | [self arg] ... .sha3(...) | +| testCryptoSwift.swift:247:24:247:28 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:248:30:248:34 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:255:36:255:46 | passwdArray | semmle.label | passwdArray | +subpaths diff --git a/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.qlref b/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.qlref new file mode 100644 index 000000000000..8648f309dcfb --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/WeakPasswordHashing.qlref @@ -0,0 +1,3 @@ +query: queries/security/CWE-328/WeakPasswordHashing.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.expected b/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.expected new file mode 100644 index 000000000000..0cf4de4515cd --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.expected @@ -0,0 +1,348 @@ +#select +| testCryptoKit.swift:86:43:86:46 | cert | testCryptoKit.swift:86:43:86:46 | cert | testCryptoKit.swift:86:43:86:46 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:86:43:86:46 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:86:43:86:46 | cert | testCryptoKit.swift:86:43:86:46 | cert | testCryptoKit.swift:86:43:86:46 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:86:43:86:46 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:88:43:88:52 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:88:43:88:52 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:88:43:88:52 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | testCryptoKit.swift:88:43:88:52 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:88:43:88:52 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:89:43:89:56 | credit_card_no | testCryptoKit.swift:89:43:89:56 | credit_card_no | testCryptoKit.swift:89:43:89:56 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:89:43:89:56 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:89:43:89:56 | credit_card_no | testCryptoKit.swift:89:43:89:56 | credit_card_no | testCryptoKit.swift:89:43:89:56 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:89:43:89:56 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:93:36:93:39 | cert | testCryptoKit.swift:93:36:93:39 | cert | testCryptoKit.swift:93:36:93:39 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:93:36:93:39 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:93:36:93:39 | cert | testCryptoKit.swift:93:36:93:39 | cert | testCryptoKit.swift:93:36:93:39 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:93:36:93:39 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:95:36:95:45 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:95:36:95:45 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:95:36:95:45 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | testCryptoKit.swift:95:36:95:45 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:95:36:95:45 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:96:36:96:49 | credit_card_no | testCryptoKit.swift:96:36:96:49 | credit_card_no | testCryptoKit.swift:96:36:96:49 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:96:36:96:49 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:96:36:96:49 | credit_card_no | testCryptoKit.swift:96:36:96:49 | credit_card_no | testCryptoKit.swift:96:36:96:49 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:96:36:96:49 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:100:44:100:47 | cert | testCryptoKit.swift:100:44:100:47 | cert | testCryptoKit.swift:100:44:100:47 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:100:44:100:47 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:100:44:100:47 | cert | testCryptoKit.swift:100:44:100:47 | cert | testCryptoKit.swift:100:44:100:47 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:100:44:100:47 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:102:44:102:53 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:102:44:102:53 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:102:44:102:53 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | testCryptoKit.swift:102:44:102:53 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:102:44:102:53 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:103:44:103:57 | credit_card_no | testCryptoKit.swift:103:44:103:57 | credit_card_no | testCryptoKit.swift:103:44:103:57 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:103:44:103:57 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:103:44:103:57 | credit_card_no | testCryptoKit.swift:103:44:103:57 | credit_card_no | testCryptoKit.swift:103:44:103:57 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:103:44:103:57 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:107:37:107:40 | cert | testCryptoKit.swift:107:37:107:40 | cert | testCryptoKit.swift:107:37:107:40 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:107:37:107:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:107:37:107:40 | cert | testCryptoKit.swift:107:37:107:40 | cert | testCryptoKit.swift:107:37:107:40 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:107:37:107:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:109:37:109:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:109:37:109:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:109:37:109:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | testCryptoKit.swift:109:37:109:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:109:37:109:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:110:37:110:50 | credit_card_no | testCryptoKit.swift:110:37:110:50 | credit_card_no | testCryptoKit.swift:110:37:110:50 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:110:37:110:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:110:37:110:50 | credit_card_no | testCryptoKit.swift:110:37:110:50 | credit_card_no | testCryptoKit.swift:110:37:110:50 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:110:37:110:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:114:37:114:40 | cert | testCryptoKit.swift:114:37:114:40 | cert | testCryptoKit.swift:114:37:114:40 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:114:37:114:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:114:37:114:40 | cert | testCryptoKit.swift:114:37:114:40 | cert | testCryptoKit.swift:114:37:114:40 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:114:37:114:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:116:37:116:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:116:37:116:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:116:37:116:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | testCryptoKit.swift:116:37:116:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:116:37:116:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:117:37:117:50 | credit_card_no | testCryptoKit.swift:117:37:117:50 | credit_card_no | testCryptoKit.swift:117:37:117:50 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:117:37:117:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:117:37:117:50 | credit_card_no | testCryptoKit.swift:117:37:117:50 | credit_card_no | testCryptoKit.swift:117:37:117:50 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:117:37:117:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:121:37:121:40 | cert | testCryptoKit.swift:121:37:121:40 | cert | testCryptoKit.swift:121:37:121:40 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:121:37:121:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:121:37:121:40 | cert | testCryptoKit.swift:121:37:121:40 | cert | testCryptoKit.swift:121:37:121:40 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:121:37:121:40 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:123:37:123:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:123:37:123:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:123:37:123:46 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | testCryptoKit.swift:123:37:123:46 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:123:37:123:46 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:124:37:124:50 | credit_card_no | testCryptoKit.swift:124:37:124:50 | credit_card_no | testCryptoKit.swift:124:37:124:50 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:124:37:124:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:124:37:124:50 | credit_card_no | testCryptoKit.swift:124:37:124:50 | credit_card_no | testCryptoKit.swift:124:37:124:50 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:124:37:124:50 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:130:23:130:26 | cert | testCryptoKit.swift:130:23:130:26 | cert | testCryptoKit.swift:130:23:130:26 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:130:23:130:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:130:23:130:26 | cert | testCryptoKit.swift:130:23:130:26 | cert | testCryptoKit.swift:130:23:130:26 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:130:23:130:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:132:23:132:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:132:23:132:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:132:23:132:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | testCryptoKit.swift:132:23:132:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:132:23:132:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:133:23:133:36 | credit_card_no | testCryptoKit.swift:133:23:133:36 | credit_card_no | testCryptoKit.swift:133:23:133:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:133:23:133:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:133:23:133:36 | credit_card_no | testCryptoKit.swift:133:23:133:36 | credit_card_no | testCryptoKit.swift:133:23:133:36 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:133:23:133:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:139:23:139:26 | cert | testCryptoKit.swift:139:23:139:26 | cert | testCryptoKit.swift:139:23:139:26 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:139:23:139:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:139:23:139:26 | cert | testCryptoKit.swift:139:23:139:26 | cert | testCryptoKit.swift:139:23:139:26 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:139:23:139:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:141:23:141:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:141:23:141:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:141:23:141:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | testCryptoKit.swift:141:23:141:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:141:23:141:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:142:23:142:36 | credit_card_no | testCryptoKit.swift:142:23:142:36 | credit_card_no | testCryptoKit.swift:142:23:142:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:142:23:142:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:142:23:142:36 | credit_card_no | testCryptoKit.swift:142:23:142:36 | credit_card_no | testCryptoKit.swift:142:23:142:36 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:142:23:142:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:148:23:148:26 | cert | testCryptoKit.swift:148:23:148:26 | cert | testCryptoKit.swift:148:23:148:26 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:148:23:148:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:148:23:148:26 | cert | testCryptoKit.swift:148:23:148:26 | cert | testCryptoKit.swift:148:23:148:26 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:148:23:148:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:150:23:150:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:150:23:150:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:150:23:150:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | testCryptoKit.swift:150:23:150:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:150:23:150:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:151:23:151:36 | credit_card_no | testCryptoKit.swift:151:23:151:36 | credit_card_no | testCryptoKit.swift:151:23:151:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:151:23:151:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:151:23:151:36 | credit_card_no | testCryptoKit.swift:151:23:151:36 | credit_card_no | testCryptoKit.swift:151:23:151:36 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:151:23:151:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:157:23:157:26 | cert | testCryptoKit.swift:157:23:157:26 | cert | testCryptoKit.swift:157:23:157:26 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:157:23:157:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:157:23:157:26 | cert | testCryptoKit.swift:157:23:157:26 | cert | testCryptoKit.swift:157:23:157:26 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:157:23:157:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:159:23:159:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:159:23:159:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:159:23:159:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | testCryptoKit.swift:159:23:159:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:159:23:159:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:160:23:160:36 | credit_card_no | testCryptoKit.swift:160:23:160:36 | credit_card_no | testCryptoKit.swift:160:23:160:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:160:23:160:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:160:23:160:36 | credit_card_no | testCryptoKit.swift:160:23:160:36 | credit_card_no | testCryptoKit.swift:160:23:160:36 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:160:23:160:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:166:23:166:26 | cert | testCryptoKit.swift:166:23:166:26 | cert | testCryptoKit.swift:166:23:166:26 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:166:23:166:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:166:23:166:26 | cert | testCryptoKit.swift:166:23:166:26 | cert | testCryptoKit.swift:166:23:166:26 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:166:23:166:26 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:23:168:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:168:23:168:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:168:23:168:32 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | testCryptoKit.swift:168:23:168:32 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:168:23:168:32 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:169:23:169:36 | credit_card_no | testCryptoKit.swift:169:23:169:36 | credit_card_no | testCryptoKit.swift:169:23:169:36 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:169:23:169:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:169:23:169:36 | credit_card_no | testCryptoKit.swift:169:23:169:36 | credit_card_no | testCryptoKit.swift:169:23:169:36 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:169:23:169:36 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:175:32:175:35 | cert | testCryptoKit.swift:175:32:175:35 | cert | testCryptoKit.swift:175:32:175:35 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:175:32:175:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:175:32:175:35 | cert | testCryptoKit.swift:175:32:175:35 | cert | testCryptoKit.swift:175:32:175:35 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:175:32:175:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:177:32:177:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:177:32:177:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | testCryptoKit.swift:177:32:177:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:177:32:177:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:178:32:178:45 | credit_card_no | testCryptoKit.swift:178:32:178:45 | credit_card_no | testCryptoKit.swift:178:32:178:45 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:178:32:178:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:178:32:178:45 | credit_card_no | testCryptoKit.swift:178:32:178:45 | credit_card_no | testCryptoKit.swift:178:32:178:45 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:178:32:178:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:184:32:184:35 | cert | testCryptoKit.swift:184:32:184:35 | cert | testCryptoKit.swift:184:32:184:35 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:184:32:184:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:184:32:184:35 | cert | testCryptoKit.swift:184:32:184:35 | cert | testCryptoKit.swift:184:32:184:35 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:184:32:184:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:186:32:186:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:186:32:186:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:186:32:186:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | testCryptoKit.swift:186:32:186:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:186:32:186:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:187:32:187:45 | credit_card_no | testCryptoKit.swift:187:32:187:45 | credit_card_no | testCryptoKit.swift:187:32:187:45 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:187:32:187:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:187:32:187:45 | credit_card_no | testCryptoKit.swift:187:32:187:45 | credit_card_no | testCryptoKit.swift:187:32:187:45 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:187:32:187:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:193:32:193:35 | cert | testCryptoKit.swift:193:32:193:35 | cert | testCryptoKit.swift:193:32:193:35 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:193:32:193:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:193:32:193:35 | cert | testCryptoKit.swift:193:32:193:35 | cert | testCryptoKit.swift:193:32:193:35 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:193:32:193:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:195:32:195:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:195:32:195:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:195:32:195:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | testCryptoKit.swift:195:32:195:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:195:32:195:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:196:32:196:45 | credit_card_no | testCryptoKit.swift:196:32:196:45 | credit_card_no | testCryptoKit.swift:196:32:196:45 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:196:32:196:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:196:32:196:45 | credit_card_no | testCryptoKit.swift:196:32:196:45 | credit_card_no | testCryptoKit.swift:196:32:196:45 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:196:32:196:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:202:32:202:35 | cert | testCryptoKit.swift:202:32:202:35 | cert | testCryptoKit.swift:202:32:202:35 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:202:32:202:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:202:32:202:35 | cert | testCryptoKit.swift:202:32:202:35 | cert | testCryptoKit.swift:202:32:202:35 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:202:32:202:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:204:32:204:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:204:32:204:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:204:32:204:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | testCryptoKit.swift:204:32:204:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:204:32:204:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:205:32:205:45 | credit_card_no | testCryptoKit.swift:205:32:205:45 | credit_card_no | testCryptoKit.swift:205:32:205:45 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:205:32:205:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:205:32:205:45 | credit_card_no | testCryptoKit.swift:205:32:205:45 | credit_card_no | testCryptoKit.swift:205:32:205:45 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:205:32:205:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:211:32:211:35 | cert | testCryptoKit.swift:211:32:211:35 | cert | testCryptoKit.swift:211:32:211:35 | cert | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:211:32:211:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:211:32:211:35 | cert | testCryptoKit.swift:211:32:211:35 | cert | testCryptoKit.swift:211:32:211:35 | cert | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:211:32:211:35 | cert | sensitive data (certificate cert) | +| testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:213:32:213:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:213:32:213:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:213:32:213:41 | account_no | sensitive data (id account_no) | +| testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | testCryptoKit.swift:213:32:213:41 | account_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:213:32:213:41 | account_no | sensitive data (private account_no) | +| testCryptoKit.swift:214:32:214:45 | credit_card_no | testCryptoKit.swift:214:32:214:45 | credit_card_no | testCryptoKit.swift:214:32:214:45 | credit_card_no | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:214:32:214:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:214:32:214:45 | credit_card_no | testCryptoKit.swift:214:32:214:45 | credit_card_no | testCryptoKit.swift:214:32:214:45 | credit_card_no | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:214:32:214:45 | credit_card_no | sensitive data (private credit_card_no) | +| testCryptoKit.swift:231:44:231:49 | value1 | testCryptoKit.swift:230:23:230:32 | cardNumber | testCryptoKit.swift:231:44:231:49 | value1 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:230:23:230:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:231:44:231:49 | value1 | testCryptoKit.swift:230:23:230:32 | cardNumber | testCryptoKit.swift:231:44:231:49 | value1 | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:230:23:230:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:235:39:235:44 | value2 | testCryptoKit.swift:233:23:233:32 | cardNumber | testCryptoKit.swift:235:39:235:44 | value2 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:233:23:233:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:235:39:235:44 | value2 | testCryptoKit.swift:233:23:233:32 | cardNumber | testCryptoKit.swift:235:39:235:44 | value2 | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:233:23:233:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:238:51:238:56 | value3 | testCryptoKit.swift:237:23:237:32 | cardNumber | testCryptoKit.swift:238:51:238:56 | value3 | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:237:23:237:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:238:51:238:56 | value3 | testCryptoKit.swift:237:23:237:32 | cardNumber | testCryptoKit.swift:238:51:238:56 | value3 | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:237:23:237:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:255:43:255:47 | value | testCryptoKit.swift:240:23:240:32 | cardNumber | testCryptoKit.swift:255:43:255:47 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:240:23:240:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:255:43:255:47 | value | testCryptoKit.swift:240:23:240:32 | cardNumber | testCryptoKit.swift:255:43:255:47 | value | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:240:23:240:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:259:37:259:41 | value | testCryptoKit.swift:243:23:243:32 | cardNumber | testCryptoKit.swift:259:37:259:41 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:243:23:243:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:259:37:259:41 | value | testCryptoKit.swift:243:23:243:32 | cardNumber | testCryptoKit.swift:259:37:259:41 | value | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:243:23:243:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:263:37:263:41 | value | testCryptoKit.swift:246:23:246:32 | cardNumber | testCryptoKit.swift:263:37:263:41 | value | Insecure hashing algorithm (MD5) depends on $@. | testCryptoKit.swift:246:23:246:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoKit.swift:263:37:263:41 | value | testCryptoKit.swift:246:23:246:32 | cardNumber | testCryptoKit.swift:263:37:263:41 | value | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoKit.swift:246:23:246:32 | cardNumber | sensitive data (private cardNumber) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:209:9:209:19 | medicalData | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:209:9:209:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:209:9:209:19 | medicalData | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:209:9:209:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:227:9:227:24 | creditCardNumber | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:227:9:227:24 | creditCardNumber | sensitive data (private creditCardNumber) | +| testCryptoSwift.swift:63:54:63:58 | bytes | testCryptoSwift.swift:227:9:227:24 | creditCardNumber | testCryptoSwift.swift:63:54:63:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:227:9:227:24 | creditCardNumber | sensitive data (private creditCardNumber) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:212:9:212:19 | medicalData | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:212:9:212:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:212:9:212:19 | medicalData | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:212:9:212:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:230:9:230:24 | creditCardNumber | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:230:9:230:24 | creditCardNumber | sensitive data (private creditCardNumber) | +| testCryptoSwift.swift:67:54:67:58 | bytes | testCryptoSwift.swift:230:9:230:24 | creditCardNumber | testCryptoSwift.swift:67:54:67:58 | bytes | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:230:9:230:24 | creditCardNumber | sensitive data (private creditCardNumber) | +| testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:166:20:166:35 | phoneNumberArray | testCryptoSwift.swift:166:20:166:35 | phoneNumberArray | testCryptoSwift.swift:166:20:166:35 | phoneNumberArray | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:166:20:166:35 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:169:21:169:36 | phoneNumberArray | testCryptoSwift.swift:169:21:169:36 | phoneNumberArray | testCryptoSwift.swift:169:21:169:36 | phoneNumberArray | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:169:21:169:36 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:182:9:182:30 | [self arg] ... .md5(...) | testCryptoSwift.swift:182:9:182:24 | phoneNumberArray | testCryptoSwift.swift:182:9:182:30 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:182:9:182:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:185:9:185:31 | [self arg] ... .sha1(...) | testCryptoSwift.swift:185:9:185:24 | phoneNumberArray | testCryptoSwift.swift:185:9:185:31 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:185:9:185:24 | phoneNumberArray | sensitive data (private phoneNumberArray) | +| testCryptoSwift.swift:200:9:200:25 | [self arg] ... .md5(...) | testCryptoSwift.swift:200:9:200:19 | medicalData | testCryptoSwift.swift:200:9:200:25 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:200:9:200:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:203:9:203:26 | [self arg] ... .sha1(...) | testCryptoSwift.swift:203:9:203:19 | medicalData | testCryptoSwift.swift:203:9:203:26 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:203:9:203:19 | medicalData | sensitive data (private medicalData) | +| testCryptoSwift.swift:218:9:218:30 | [self arg] ... .md5(...) | testCryptoSwift.swift:218:9:218:24 | creditCardNumber | testCryptoSwift.swift:218:9:218:30 | [self arg] ... .md5(...) | Insecure hashing algorithm (MD5) depends on $@. | testCryptoSwift.swift:218:9:218:24 | creditCardNumber | sensitive data (private creditCardNumber) | +| testCryptoSwift.swift:221:9:221:31 | [self arg] ... .sha1(...) | testCryptoSwift.swift:221:9:221:24 | creditCardNumber | testCryptoSwift.swift:221:9:221:31 | [self arg] ... .sha1(...) | Insecure hashing algorithm (SHA1) depends on $@. | testCryptoSwift.swift:221:9:221:24 | creditCardNumber | sensitive data (private creditCardNumber) | +edges +| testCryptoKit.swift:230:9:230:14 | value1 | testCryptoKit.swift:231:44:231:49 | value1 | provenance | | +| testCryptoKit.swift:230:18:230:38 | Data(...) | testCryptoKit.swift:230:9:230:14 | value1 | provenance | | +| testCryptoKit.swift:230:23:230:32 | cardNumber | testCryptoKit.swift:230:23:230:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:230:23:230:37 | ... .utf8 | testCryptoKit.swift:230:18:230:38 | Data(...) | provenance | | +| testCryptoKit.swift:233:9:233:14 | value2 | testCryptoKit.swift:235:39:235:44 | value2 | provenance | | +| testCryptoKit.swift:233:18:233:38 | Data(...) | testCryptoKit.swift:233:9:233:14 | value2 | provenance | | +| testCryptoKit.swift:233:23:233:32 | cardNumber | testCryptoKit.swift:233:23:233:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:233:23:233:37 | ... .utf8 | testCryptoKit.swift:233:18:233:38 | Data(...) | provenance | | +| testCryptoKit.swift:237:9:237:14 | value3 | testCryptoKit.swift:238:51:238:56 | value3 | provenance | | +| testCryptoKit.swift:237:18:237:38 | Data(...) | testCryptoKit.swift:237:9:237:14 | value3 | provenance | | +| testCryptoKit.swift:237:23:237:32 | cardNumber | testCryptoKit.swift:237:23:237:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:237:23:237:37 | ... .utf8 | testCryptoKit.swift:237:18:237:38 | Data(...) | provenance | | +| testCryptoKit.swift:240:9:240:14 | value4 | testCryptoKit.swift:241:26:241:31 | value4 | provenance | | +| testCryptoKit.swift:240:18:240:38 | Data(...) | testCryptoKit.swift:240:9:240:14 | value4 | provenance | | +| testCryptoKit.swift:240:23:240:32 | cardNumber | testCryptoKit.swift:240:23:240:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:240:23:240:37 | ... .utf8 | testCryptoKit.swift:240:18:240:38 | Data(...) | provenance | | +| testCryptoKit.swift:241:26:241:31 | value4 | testCryptoKit.swift:254:20:254:24 | value | provenance | | +| testCryptoKit.swift:243:9:243:14 | value5 | testCryptoKit.swift:244:53:244:58 | value5 | provenance | | +| testCryptoKit.swift:243:18:243:38 | Data(...) | testCryptoKit.swift:243:9:243:14 | value5 | provenance | | +| testCryptoKit.swift:243:23:243:32 | cardNumber | testCryptoKit.swift:243:23:243:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:243:23:243:37 | ... .utf8 | testCryptoKit.swift:243:18:243:38 | Data(...) | provenance | | +| testCryptoKit.swift:244:53:244:58 | value5 | testCryptoKit.swift:258:47:258:51 | value | provenance | | +| testCryptoKit.swift:246:9:246:14 | value6 | testCryptoKit.swift:247:53:247:58 | value6 | provenance | | +| testCryptoKit.swift:246:18:246:38 | Data(...) | testCryptoKit.swift:246:9:246:14 | value6 | provenance | | +| testCryptoKit.swift:246:23:246:32 | cardNumber | testCryptoKit.swift:246:23:246:37 | ... .utf8 | provenance | | +| testCryptoKit.swift:246:23:246:37 | ... .utf8 | testCryptoKit.swift:246:18:246:38 | Data(...) | provenance | | +| testCryptoKit.swift:247:53:247:58 | value6 | testCryptoKit.swift:262:53:262:57 | value | provenance | | +| testCryptoKit.swift:254:20:254:24 | value | testCryptoKit.swift:255:43:255:47 | value | provenance | | +| testCryptoKit.swift:258:47:258:51 | value | testCryptoKit.swift:259:37:259:41 | value | provenance | | +| testCryptoKit.swift:262:53:262:57 | value | testCryptoKit.swift:263:37:263:41 | value | provenance | | +| testCryptoSwift.swift:62:24:62:28 | bytes | testCryptoSwift.swift:63:54:63:58 | bytes | provenance | | +| testCryptoSwift.swift:66:24:66:28 | bytes | testCryptoSwift.swift:67:54:67:58 | bytes | provenance | | +| testCryptoSwift.swift:89:28:89:31 | self | testCryptoSwift.swift:62:24:62:28 | bytes | provenance | | +| testCryptoSwift.swift:93:28:93:31 | self | testCryptoSwift.swift:66:24:66:28 | bytes | provenance | | +| testCryptoSwift.swift:115:33:115:37 | bytes | testCryptoSwift.swift:62:24:62:28 | bytes | provenance | | +| testCryptoSwift.swift:119:33:119:37 | bytes | testCryptoSwift.swift:66:24:66:28 | bytes | provenance | | +| testCryptoSwift.swift:141:16:141:19 | self | testCryptoSwift.swift:89:28:89:31 | self | provenance | | +| testCryptoSwift.swift:145:16:145:19 | self | testCryptoSwift.swift:93:28:93:31 | self | provenance | | +| testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | testCryptoSwift.swift:62:24:62:28 | bytes | provenance | | +| testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | testCryptoSwift.swift:66:24:66:28 | bytes | provenance | | +| testCryptoSwift.swift:182:9:182:24 | phoneNumberArray | testCryptoSwift.swift:182:9:182:30 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:185:9:185:24 | phoneNumberArray | testCryptoSwift.swift:185:9:185:31 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | testCryptoSwift.swift:89:28:89:31 | self | provenance | | +| testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | testCryptoSwift.swift:93:28:93:31 | self | provenance | | +| testCryptoSwift.swift:200:9:200:19 | medicalData | testCryptoSwift.swift:200:9:200:25 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:203:9:203:19 | medicalData | testCryptoSwift.swift:203:9:203:26 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:209:9:209:19 | medicalData | testCryptoSwift.swift:115:33:115:37 | bytes | provenance | | +| testCryptoSwift.swift:212:9:212:19 | medicalData | testCryptoSwift.swift:119:33:119:37 | bytes | provenance | | +| testCryptoSwift.swift:218:9:218:24 | creditCardNumber | testCryptoSwift.swift:218:9:218:30 | [self arg] ... .md5(...) | provenance | | +| testCryptoSwift.swift:221:9:221:24 | creditCardNumber | testCryptoSwift.swift:221:9:221:31 | [self arg] ... .sha1(...) | provenance | | +| testCryptoSwift.swift:227:9:227:24 | creditCardNumber | testCryptoSwift.swift:141:16:141:19 | self | provenance | | +| testCryptoSwift.swift:230:9:230:24 | creditCardNumber | testCryptoSwift.swift:145:16:145:19 | self | provenance | | +nodes +| testCryptoKit.swift:86:43:86:46 | cert | semmle.label | cert | +| testCryptoKit.swift:88:43:88:52 | account_no | semmle.label | account_no | +| testCryptoKit.swift:89:43:89:56 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:93:36:93:39 | cert | semmle.label | cert | +| testCryptoKit.swift:95:36:95:45 | account_no | semmle.label | account_no | +| testCryptoKit.swift:96:36:96:49 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:100:44:100:47 | cert | semmle.label | cert | +| testCryptoKit.swift:102:44:102:53 | account_no | semmle.label | account_no | +| testCryptoKit.swift:103:44:103:57 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:107:37:107:40 | cert | semmle.label | cert | +| testCryptoKit.swift:109:37:109:46 | account_no | semmle.label | account_no | +| testCryptoKit.swift:110:37:110:50 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:114:37:114:40 | cert | semmle.label | cert | +| testCryptoKit.swift:116:37:116:46 | account_no | semmle.label | account_no | +| testCryptoKit.swift:117:37:117:50 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:121:37:121:40 | cert | semmle.label | cert | +| testCryptoKit.swift:123:37:123:46 | account_no | semmle.label | account_no | +| testCryptoKit.swift:124:37:124:50 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:130:23:130:26 | cert | semmle.label | cert | +| testCryptoKit.swift:132:23:132:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:133:23:133:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:139:23:139:26 | cert | semmle.label | cert | +| testCryptoKit.swift:141:23:141:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:142:23:142:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:148:23:148:26 | cert | semmle.label | cert | +| testCryptoKit.swift:150:23:150:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:151:23:151:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:157:23:157:26 | cert | semmle.label | cert | +| testCryptoKit.swift:159:23:159:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:160:23:160:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:166:23:166:26 | cert | semmle.label | cert | +| testCryptoKit.swift:168:23:168:32 | account_no | semmle.label | account_no | +| testCryptoKit.swift:169:23:169:36 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:175:32:175:35 | cert | semmle.label | cert | +| testCryptoKit.swift:177:32:177:41 | account_no | semmle.label | account_no | +| testCryptoKit.swift:178:32:178:45 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:184:32:184:35 | cert | semmle.label | cert | +| testCryptoKit.swift:186:32:186:41 | account_no | semmle.label | account_no | +| testCryptoKit.swift:187:32:187:45 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:193:32:193:35 | cert | semmle.label | cert | +| testCryptoKit.swift:195:32:195:41 | account_no | semmle.label | account_no | +| testCryptoKit.swift:196:32:196:45 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:202:32:202:35 | cert | semmle.label | cert | +| testCryptoKit.swift:204:32:204:41 | account_no | semmle.label | account_no | +| testCryptoKit.swift:205:32:205:45 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:211:32:211:35 | cert | semmle.label | cert | +| testCryptoKit.swift:213:32:213:41 | account_no | semmle.label | account_no | +| testCryptoKit.swift:214:32:214:45 | credit_card_no | semmle.label | credit_card_no | +| testCryptoKit.swift:230:9:230:14 | value1 | semmle.label | value1 | +| testCryptoKit.swift:230:18:230:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:230:23:230:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:230:23:230:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:231:44:231:49 | value1 | semmle.label | value1 | +| testCryptoKit.swift:233:9:233:14 | value2 | semmle.label | value2 | +| testCryptoKit.swift:233:18:233:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:233:23:233:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:233:23:233:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:235:39:235:44 | value2 | semmle.label | value2 | +| testCryptoKit.swift:237:9:237:14 | value3 | semmle.label | value3 | +| testCryptoKit.swift:237:18:237:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:237:23:237:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:237:23:237:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:238:51:238:56 | value3 | semmle.label | value3 | +| testCryptoKit.swift:240:9:240:14 | value4 | semmle.label | value4 | +| testCryptoKit.swift:240:18:240:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:240:23:240:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:240:23:240:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:241:26:241:31 | value4 | semmle.label | value4 | +| testCryptoKit.swift:243:9:243:14 | value5 | semmle.label | value5 | +| testCryptoKit.swift:243:18:243:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:243:23:243:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:243:23:243:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:244:53:244:58 | value5 | semmle.label | value5 | +| testCryptoKit.swift:246:9:246:14 | value6 | semmle.label | value6 | +| testCryptoKit.swift:246:18:246:38 | Data(...) | semmle.label | Data(...) | +| testCryptoKit.swift:246:23:246:32 | cardNumber | semmle.label | cardNumber | +| testCryptoKit.swift:246:23:246:37 | ... .utf8 | semmle.label | ... .utf8 | +| testCryptoKit.swift:247:53:247:58 | value6 | semmle.label | value6 | +| testCryptoKit.swift:254:20:254:24 | value | semmle.label | value | +| testCryptoKit.swift:255:43:255:47 | value | semmle.label | value | +| testCryptoKit.swift:258:47:258:51 | value | semmle.label | value | +| testCryptoKit.swift:259:37:259:41 | value | semmle.label | value | +| testCryptoKit.swift:262:53:262:57 | value | semmle.label | value | +| testCryptoKit.swift:263:37:263:41 | value | semmle.label | value | +| testCryptoSwift.swift:62:24:62:28 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:63:54:63:58 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:66:24:66:28 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:67:54:67:58 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:89:28:89:31 | self | semmle.label | self | +| testCryptoSwift.swift:93:28:93:31 | self | semmle.label | self | +| testCryptoSwift.swift:115:33:115:37 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:119:33:119:37 | bytes | semmle.label | bytes | +| testCryptoSwift.swift:141:16:141:19 | self | semmle.label | self | +| testCryptoSwift.swift:145:16:145:19 | self | semmle.label | self | +| testCryptoSwift.swift:153:30:153:45 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:156:31:156:46 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:159:47:159:62 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:162:47:162:62 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:166:20:166:35 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:169:21:169:36 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:175:21:175:36 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:178:21:178:36 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:182:9:182:24 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:182:9:182:30 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:185:9:185:24 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:185:9:185:31 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:191:9:191:24 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:194:9:194:24 | phoneNumberArray | semmle.label | phoneNumberArray | +| testCryptoSwift.swift:200:9:200:19 | medicalData | semmle.label | medicalData | +| testCryptoSwift.swift:200:9:200:25 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:203:9:203:19 | medicalData | semmle.label | medicalData | +| testCryptoSwift.swift:203:9:203:26 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:209:9:209:19 | medicalData | semmle.label | medicalData | +| testCryptoSwift.swift:212:9:212:19 | medicalData | semmle.label | medicalData | +| testCryptoSwift.swift:218:9:218:24 | creditCardNumber | semmle.label | creditCardNumber | +| testCryptoSwift.swift:218:9:218:30 | [self arg] ... .md5(...) | semmle.label | [self arg] ... .md5(...) | +| testCryptoSwift.swift:221:9:221:24 | creditCardNumber | semmle.label | creditCardNumber | +| testCryptoSwift.swift:221:9:221:31 | [self arg] ... .sha1(...) | semmle.label | [self arg] ... .sha1(...) | +| testCryptoSwift.swift:227:9:227:24 | creditCardNumber | semmle.label | creditCardNumber | +| testCryptoSwift.swift:230:9:230:24 | creditCardNumber | semmle.label | creditCardNumber | +subpaths diff --git a/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.qlref b/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.qlref new file mode 100644 index 000000000000..64c2211dbd07 --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/WeakSensitiveDataHashing.qlref @@ -0,0 +1,3 @@ +query: queries/security/CWE-328/WeakSensitiveDataHashing.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/unified/ql/test/query-tests/security/CWE-328/testArgon2Swift.swift b/unified/ql/test/query-tests/security/CWE-328/testArgon2Swift.swift new file mode 100644 index 000000000000..c75b32055a23 --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/testArgon2Swift.swift @@ -0,0 +1,49 @@ + +// --- stubs --- + +class Data +{ + init(_ elements: S) {} +} + +class Salt { + init(bytes: Data) { } + + static func newSalt(length: Int = 16) -> Salt { + return Salt(bytes: Data(0)) + } +} + +class Argon2SwiftResult { + init(hashBytes: [Int8], encodedBytes: [Int8]) { } + + func encodedString() -> String { + return "" + } +} + +class Argon2Swift { + // slightly simplified (type and version changed to Int) + static func hashPasswordString(password: String, salt: Salt, iterations: Int = 32, memory: Int = 256, parallelism: Int = 2, length: Int = 32, type: Int = 1, version: Int = 13) throws -> Argon2SwiftResult { + return Argon2SwiftResult(hashBytes: [], encodedBytes: []) + } + + static func verifyHashString(password: String, hash: String, type: Int = 1) throws -> Bool { + return false + } +} + +// --- tests --- + +func testGoodPasswordHashingExample(passwordString: String) { + // this is the "good" example from the `.qhelp` + let salt = Salt.newSalt() + let result = try! Argon2Swift.hashPasswordString(password: passwordString, salt: salt) // GOOD (suitable password hash) + let passwordHash = result.encodedString() + + // ... + + if try! Argon2Swift.verifyHashString(password: passwordString, hash: passwordHash) { + // ... + } +} diff --git a/unified/ql/test/query-tests/security/CWE-328/testCryptoKit.swift b/unified/ql/test/query-tests/security/CWE-328/testCryptoKit.swift new file mode 100644 index 000000000000..eb6f236faa8d --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/testCryptoKit.swift @@ -0,0 +1,264 @@ +//codeql-extractor-options: -module-name Crypto + +// --- stubs --- + +class Data +{ + init(_ elements: S) {} +} + +public protocol HashFunction { + associatedtype Digest + + init() + mutating func update(bufferPointer: UnsafeRawBufferPointer) + func finalize() -> Digest +} + +extension HashFunction { + @inlinable + public static func hash(bufferPointer: UnsafeRawBufferPointer) -> Digest { + var hasher = Self() + hasher.update(bufferPointer: bufferPointer) + return hasher.finalize() + } + + @inlinable + public static func hash(data: D) -> Self.Digest { + var hasher = Self() + hasher.update(data: data) + return hasher.finalize() + } + + @inlinable + public mutating func update(data: D) { + // ... + } +} + +public struct SHA256: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} + +public struct SHA384: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} + +public struct SHA512: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } +} + +enum Insecure { + public struct MD5: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } + } + + public struct SHA1: HashFunction { + public typealias Digest = [UInt8] + + public init() {} + public mutating func update(bufferPointer: UnsafeRawBufferPointer) {} + public func finalize() -> Digest { return [] } + } +} + +// --- tests --- + +func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.Insecure.MD5.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Crypto.Insecure.MD5.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Crypto.Insecure.MD5.hash(data: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Crypto.Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) + hash = Crypto.Insecure.MD5.hash(data: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Crypto.Insecure.MD5.hash(data: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + + hash = Insecure.MD5.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Insecure.MD5.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Insecure.MD5.hash(data: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Insecure.MD5.hash(data: encrypted_passwd) // GOOD (not sensitive) + hash = Insecure.MD5.hash(data: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Insecure.MD5.hash(data: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + + hash = Crypto.Insecure.SHA1.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Crypto.Insecure.SHA1.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash = Crypto.Insecure.SHA1.hash(data: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Crypto.Insecure.SHA1.hash(data: encrypted_passwd) // GOOD (not sensitive) + hash = Crypto.Insecure.SHA1.hash(data: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash = Crypto.Insecure.SHA1.hash(data: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + + hash = Crypto.SHA256.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA256.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA256.hash(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA256.hash(data: encrypted_passwd) // GOOD, not sensitive + hash = Crypto.SHA256.hash(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA256.hash(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + + hash = Crypto.SHA384.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA384.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA384.hash(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA384.hash(data: encrypted_passwd) // GOOD, not sensitive + hash = Crypto.SHA384.hash(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA384.hash(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + + hash = Crypto.SHA512.hash(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA512.hash(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash = Crypto.SHA512.hash(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA512.hash(data: encrypted_passwd) // GOOD, not sensitive + hash = Crypto.SHA512.hash(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required + hash = Crypto.SHA512.hash(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD, computationally expensive hash not required +} + +func testMD5UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.Insecure.MD5() + hash.update(data: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash.update(data: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(data: encrypted_passwd) // GOOD (not sensitive) + hash.update(data: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(data: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testSHA1UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.Insecure.SHA1() + hash.update(data: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash.update(data: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(data: encrypted_passwd) // GOOD (not sensitive) + hash.update(data: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(data: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.SHA256() + hash.update(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: encrypted_passwd) // GOOD (not sensitive) + hash.update(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.SHA384() + hash.update(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: encrypted_passwd) // GOOD (not sensitive) + hash.update(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testSHA512UpdateWithData(passwd : String, cert: String, encrypted_passwd : String, account_no : String, credit_card_no : String) { + var hash = Crypto.SHA512() + hash.update(data: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(data: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: encrypted_passwd) // GOOD (not sensitive) + hash.update(data: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(data: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testMD5UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, cert: UnsafeRawBufferPointer, encrypted_passwd : UnsafeRawBufferPointer, account_no : UnsafeRawBufferPointer, credit_card_no : UnsafeRawBufferPointer) { + var hash = Crypto.Insecure.MD5() + hash.update(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash.update(bufferPointer: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(bufferPointer: encrypted_passwd) // GOOD (not sensitive) + hash.update(bufferPointer: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(bufferPointer: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testSHA1UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, cert: UnsafeRawBufferPointer, encrypted_passwd : UnsafeRawBufferPointer, account_no : UnsafeRawBufferPointer, credit_card_no : UnsafeRawBufferPointer) { + var hash = Crypto.Insecure.SHA1() + hash.update(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] + hash.update(bufferPointer: cert) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(bufferPointer: encrypted_passwd) // GOOD (not sensitive) + hash.update(bufferPointer: account_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] + hash.update(bufferPointer: credit_card_no) // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testSHA256UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, cert: UnsafeRawBufferPointer, encrypted_passwd : UnsafeRawBufferPointer, account_no : UnsafeRawBufferPointer, credit_card_no : UnsafeRawBufferPointer) { + var hash = Crypto.SHA256() + hash.update(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(bufferPointer: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: encrypted_passwd) // GOOD (not sensitive) + hash.update(bufferPointer: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testSHA384UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, cert: UnsafeRawBufferPointer, encrypted_passwd : UnsafeRawBufferPointer, account_no : UnsafeRawBufferPointer, credit_card_no : UnsafeRawBufferPointer) { + var hash = Crypto.SHA384() + hash.update(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(bufferPointer: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: encrypted_passwd) // GOOD (not sensitive) + hash.update(bufferPointer: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testSHA512UpdateWithUnsafeRawBufferPointer(passwd : UnsafeRawBufferPointer, cert: UnsafeRawBufferPointer, encrypted_passwd : UnsafeRawBufferPointer, account_no : UnsafeRawBufferPointer, credit_card_no : UnsafeRawBufferPointer) { + var hash = Crypto.SHA512() + hash.update(bufferPointer: passwd) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + hash.update(bufferPointer: cert) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: encrypted_passwd) // GOOD (not sensitive) + hash.update(bufferPointer: account_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + hash.update(bufferPointer: credit_card_no) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD +} + +func testBadPasswordHashingExample(passwordString: String) { + // this is the "bad" example from the `.qhelp` + let passwordData = Data(passwordString.utf8) + let passwordHash = Crypto.SHA512.hash(data: passwordData) // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + + // ... + + if Crypto.SHA512.hash(data: Data(passwordString.utf8)) == passwordHash { // $ Alert[unified/swift/weak-password-hashing] (not a computationally expensive hash) + // ... + } +} + +func testWithFlowAndMetatypes(cardNumber: String, passwordString: String) { + let value1 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + let _digest1 = Insecure.MD5.hash(data: value1); // $ Alert[unified/swift/weak-sensitive-data-hashing] + + let value2 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + let hasher2 = Insecure.MD5.self; // metatype + let _digest2 = hasher2.hash(data: value2); // $ Alert[unified/swift/weak-sensitive-data-hashing] + + let value3 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + let _digest3 = (Insecure.MD5.self).hash(data: value3); // $ Alert[unified/swift/weak-sensitive-data-hashing] + + let value4 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + testReceiver1(value: value4); + + let value5 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + testReceiver2(hasher: Insecure.MD5.self, value: value5); + + let value6 = Data(cardNumber.utf8); // $ Source[unified/swift/weak-sensitive-data-hashing] + testReceiver3(hasher: Insecure.MD5.self, value: value6); + + let value7 = Data(passwordString.utf8); // $ Source[unified/swift/weak-password-hashing] + let hasher7 = SHA256.self; // metatype + let _digest7 = hasher7.hash(data: value7); // $ Alert[unified/swift/weak-password-hashing] +} + +func testReceiver1(value: Data) { + let _digest = Insecure.MD5.hash(data: value); // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testReceiver2(hasher: Insecure.MD5.Type, value: Data) { + let _digest = hasher.hash(data: value); // $ Alert[unified/swift/weak-sensitive-data-hashing] +} + +func testReceiver3(hasher: H.Type, value: Data) { + let _digest = hasher.hash(data: value); // $ Alert[unified/swift/weak-sensitive-data-hashing] +} diff --git a/unified/ql/test/query-tests/security/CWE-328/testCryptoSwift.swift b/unified/ql/test/query-tests/security/CWE-328/testCryptoSwift.swift new file mode 100644 index 000000000000..814616d3d547 --- /dev/null +++ b/unified/ql/test/query-tests/security/CWE-328/testCryptoSwift.swift @@ -0,0 +1,256 @@ + +// --- stubs --- + +class Data +{ + init(_ elements: S) {} +} + +protocol DigestType { + func calculate(for bytes: Array) -> Array +} + +class MD5 : DigestType { + public func calculate(for bytes: Array) -> Array { + return Array() + } +} + +class SHA1 : DigestType { + public func calculate(for bytes: Array) -> Array { + return Array() + } +} + +class SHA2 : DigestType { + public enum Variant { + case sha512 + } + + public init(variant: SHA2.Variant) {} + + public func calculate(for bytes: Array) -> Array { + return Array() + } +} + +class SHA3 : DigestType { + public enum Variant { + case sha512 + } + + public init(variant: SHA3.Variant) {} + + public func calculate(for bytes: Array) -> Array { + return Array() + } +} + +struct Digest { + static func md5(_ bytes: Array) -> Array { + return MD5().calculate(for: bytes) + } + + static func sha1(_ bytes: Array) -> Array { + return SHA1().calculate(for: bytes) + } + + static func sha512(_ bytes: Array) -> Array { + return self.sha2(bytes, variant: .sha512) + } + + static func sha2(_ bytes: Array, variant: SHA2.Variant) -> Array { + return SHA2(variant: variant).calculate(for: bytes) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] + } + + static func sha3(_ bytes: Array, variant: SHA3.Variant) -> Array { + return SHA3(variant: variant).calculate(for: bytes) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] + } +} + +extension Array where Element == UInt8 { + func toHexString() -> String { + return "" + } + + func md5() -> [Element] { + return Digest.md5(self) + } + + func sha1() -> [Element] { + return Digest.sha1(self) + } + + func sha512() -> [Element] { + return Digest.sha512(self) + } + + func sha2(_ variant: SHA2.Variant) -> [Element] { + return Digest.sha2(self, variant: variant) + } + + func sha3(_ variant: SHA3.Variant) -> [Element] { + return Digest.sha3(self, variant: variant) + } +} + +extension Data { + var bytes: Array { + return Array() + } + + func md5() -> Data { + return Data(Digest.md5(bytes)) + } + + func sha1() -> Data { + return Data(Digest.sha1(bytes)) + } + + func sha512() -> Data { + return Data(Digest.sha512(bytes)) + } + + func sha2(_ variant: SHA2.Variant) -> Data { + return Data(Digest.sha2(bytes, variant: variant)) + } + + func sha3(_ variant: SHA3.Variant) -> Data { + return Data(Digest.sha3(bytes, variant: variant)) + } +} + +extension String { + var bytes: Array { + return Array() + } + + func md5() -> String { + return self.bytes.md5().toHexString() + } + + func sha1() -> String { + return self.bytes.sha1().toHexString() + } + + func sha512() -> String { + return self.bytes.sha512().toHexString() + } + + func sha2(_ variant: SHA2.Variant) -> String { + return self.bytes.sha2(variant).toHexString() + } + + func sha3(_ variant: SHA3.Variant) -> String { + return self.bytes.sha3(variant).toHexString() + } +} + +// --- tests --- + +func testArrays(harmlessArray: Array, phoneNumberArray: Array, passwdArray: Array) { + _ = MD5().calculate(for: harmlessArray) // GOOD (not sensitive) + _ = MD5().calculate(for: phoneNumberArray) // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = MD5().calculate(for: passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = SHA1().calculate(for: harmlessArray) // GOOD (not sensitive) + _ = SHA1().calculate(for: phoneNumberArray) // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = SHA1().calculate(for: passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = SHA2(variant: .sha512).calculate(for: harmlessArray) // GOOD + _ = SHA2(variant: .sha512).calculate(for: phoneNumberArray) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = SHA2(variant: .sha512).calculate(for: passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = SHA3(variant: .sha512).calculate(for: harmlessArray) // GOOD + _ = SHA3(variant: .sha512).calculate(for: phoneNumberArray) // $ SPURIOUS: Alert[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = SHA3(variant: .sha512).calculate(for: passwdArray) // $ Alert[unified/swift/weak-password-hashing] + + _ = Digest.md5(harmlessArray) // GOOD (not sensitive) + _ = Digest.md5(phoneNumberArray) // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = Digest.md5(passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = Digest.sha1(harmlessArray) // GOOD (not sensitive) + _ = Digest.sha1(phoneNumberArray) // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = Digest.sha1(passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = Digest.sha512(harmlessArray) // GOOD (not sensitive) + _ = Digest.sha512(phoneNumberArray) // GOOD + _ = Digest.sha512(passwdArray) // $ Alert[unified/swift/weak-password-hashing] + _ = Digest.sha2(harmlessArray, variant: .sha512) // GOOD (not sensitive) + _ = Digest.sha2(phoneNumberArray, variant: .sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = Digest.sha2(passwdArray, variant: .sha512) // $ Alert[unified/swift/weak-password-hashing] + _ = Digest.sha3(harmlessArray, variant: .sha512) // GOOD (not sensitive) + _ = Digest.sha3(phoneNumberArray, variant: .sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = Digest.sha3(passwdArray, variant: .sha512) // $ Alert[unified/swift/weak-password-hashing] + + _ = harmlessArray.md5() // GOOD (not sensitive) + _ = phoneNumberArray.md5() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwdArray.md5() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessArray.sha1() // GOOD (not sensitive) + _ = phoneNumberArray.sha1() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwdArray.sha1() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessArray.sha512() // GOOD + _ = phoneNumberArray.sha512() // GOOD + _ = passwdArray.sha512() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessArray.sha2(.sha512) // GOOD + _ = phoneNumberArray.sha2(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwdArray.sha2(.sha512) // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessArray.sha3(.sha512) // GOOD + _ = phoneNumberArray.sha3(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwdArray.sha3(.sha512) // $ Alert[unified/swift/weak-password-hashing] +} + +func testData(harmlessData: Data, medicalData: Data, passwdData: Data) { + _ = harmlessData.md5() // GOOD (not sensitive) + _ = medicalData.md5() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwdData.md5() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessData.sha1() // GOOD (not sensitive) + _ = medicalData.sha1() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwdData.sha1() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessData.sha512() // GOOD + _ = medicalData.sha512() // GOOD + _ = passwdData.sha512() // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessData.sha2(.sha512) // GOOD + _ = medicalData.sha2(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwdData.sha2(.sha512) // $ Alert[unified/swift/weak-password-hashing] + _ = harmlessData.sha3(.sha512) // GOOD + _ = medicalData.sha3(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwdData.sha3(.sha512) // $ Alert[unified/swift/weak-password-hashing] +} + +func testStrings(creditCardNumber: String, passwd: String) { + _ = "harmless".md5() // GOOD (not sensitive) + _ = creditCardNumber.md5() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwd.md5() // $ Alert[unified/swift/weak-password-hashing] + _ = "harmless".sha1() // GOOD (not sensitive) + _ = creditCardNumber.sha1() // $ Alert[unified/swift/weak-sensitive-data-hashing] + _ = passwd.sha1() // $ Alert[unified/swift/weak-password-hashing] + _ = "harmless".sha512() // GOOD + _ = creditCardNumber.sha512() // GOOD + _ = passwd.sha512() // $ Alert[unified/swift/weak-password-hashing] + _ = "harmless".sha2(.sha512) // GOOD + _ = creditCardNumber.sha2(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwd.sha2(.sha512) // $ Alert[unified/swift/weak-password-hashing] + _ = "harmless".sha3(.sha512) // GOOD + _ = creditCardNumber.sha3(.sha512) // $ SPURIOUS: Source[unified/swift/weak-sensitive-data-hashing] // GOOD + _ = passwd.sha3(.sha512) // $ Alert[unified/swift/weak-password-hashing] +} + +struct PBKDF2 { + static func derive(bytes: Array) -> Array { + return Digest.sha512(bytes) // GOOD (inside PBKDF2 implementation) + } +} + +extension PBKDF2 { + static func deriveInExtension(bytes: Array) -> Array { + return Digest.sha512(bytes) // GOOD (inside PBKDF2 extension) + } +} + +struct CustomHasher { + static func derive(bytes: Array) -> Array { + return Digest.sha512(bytes) // $ Alert[unified/swift/weak-password-hashing] + } +} + +func testImplementationBarrier(passwdArray: Array) { + _ = PBKDF2.derive(bytes: passwdArray) + _ = PBKDF2.deriveInExtension(bytes: passwdArray) + _ = CustomHasher.derive(bytes: passwdArray) // $ Source[unified/swift/weak-password-hashing] +}