We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 326242a commit 034daa9Copy full SHA for 034daa9
swift/ql/lib/codeql/swift/security/WeakPasswordHashingExtensions.qll
@@ -111,3 +111,18 @@ private class DefaultWeakPasswordHashingSink extends WeakPasswordHashingSink {
111
112
override string getAlgorithm() { result = algorithm }
113
}
114
+
115
+/**
116
+ * A barrier for weak password hashing, when it occurs inside of
117
+ * certain cryptographic algorithms as part of their design.
118
+ */
119
+class WeakPasswordHashingImplementationBarrier extends WeakPasswordHashingBarrier {
120
+ WeakPasswordHashingImplementationBarrier() {
121
+ this.asParameter()
122
+ .getDeclaringFunction()
123
+ .(Function)
124
+ .getDeclaringDecl*()
125
+ .(NominalTypeDecl)
126
+ .getName() = ["HMAC", "PBKDF1", "PBKDF2"]
127
+ }
128
+}
0 commit comments