Skip to content

Commit aa5c893

Browse files
committed
Swift: Further simplify.
1 parent 97bd91e commit aa5c893

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

swift/ql/src/queries/Security/CWE-1204/StaticInitializationVector.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class EncryptionInitializationSink extends Expr {
3939
"AES", "ChaCha20", "Blowfish", "Rabbit", "CBC", "CFB", "GCM", "OCB", "OFB", "PCBC",
4040
"CCM", "CTR"
4141
], fName) and
42-
fName.matches("%init(%iv:%") and
42+
fName.matches("%init(%") and
4343
call.getArgumentWithLabel("iv").getExpr() = this
4444
)
4545
}

swift/ql/src/queries/Security/CWE-259/ConstantPassword.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ConstantPasswordSink extends Expr {
3535
exists(ClassOrStructDecl c, AbstractFunctionDecl f, CallExpr call |
3636
c.getFullName() = ["HKDF", "PBKDF1", "PBKDF2", "Scrypt"] and
3737
c.getAMember() = f and
38-
f.getName().matches("%init(%password:%") and
38+
f.getName().matches("%init(%") and
3939
call.getStaticTarget() = f and
4040
call.getArgumentWithLabel("password").getExpr() = this
4141
)

swift/ql/src/queries/Security/CWE-760/ConstantSalt.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ConstantSaltSink extends Expr {
3535
exists(ClassOrStructDecl c, AbstractFunctionDecl f, CallExpr call |
3636
c.getFullName() = ["HKDF", "PBKDF1", "PBKDF2", "Scrypt"] and
3737
c.getAMember() = f and
38-
f.getName().matches("%init(%salt:%") and
38+
f.getName().matches("%init(%") and
3939
call.getStaticTarget() = f and
4040
call.getArgumentWithLabel("salt").getExpr() = this
4141
)

swift/ql/src/queries/Security/CWE-916/InsufficientHashIterations.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class InsufficientHashIterationsSink extends Expr {
3636
exists(ClassOrStructDecl c, AbstractFunctionDecl f, CallExpr call |
3737
c.getFullName() = ["PBKDF1", "PBKDF2"] and
3838
c.getAMember() = f and
39-
f.getName().matches("init(%iterations:%") and
39+
f.getName().matches("init(%") and
4040
call.getStaticTarget() = f and
4141
call.getArgumentWithLabel("iterations").getExpr() = this
4242
)

0 commit comments

Comments
 (0)