Skip to content

Commit 1c75729

Browse files
committed
Swift: Autoformat.
1 parent 0d14835 commit 1c75729

9 files changed

+13
-12
lines changed

swift/ql/lib/codeql/swift/security/ConstantPasswordExtensions.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ private class RnCryptorPasswordSink extends ConstantPasswordSink {
5353
c.getName() = ["RNCryptor", "RNEncryptor", "RNDecryptor"] and
5454
c.getAMember() = f and
5555
call.getStaticTarget() = f and
56-
call.getArgumentWithLabel(["password", "withPassword", "forPassword"]).getExpr() = this.asExpr()
56+
call.getArgumentWithLabel(["password", "withPassword", "forPassword"]).getExpr() =
57+
this.asExpr()
5758
)
5859
or
5960
// RNCryptor (unlabelled arguments)

swift/ql/lib/codeql/swift/security/ConstantPasswordQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module ConstantPasswordConfig implements DataFlow::ConfigSig {
2828

2929
predicate isSink(DataFlow::Node node) { node instanceof ConstantPasswordSink }
3030

31-
predicate isBarrier(DataFlow::Node node) { node instanceof ConstantPasswordSanitizer}
31+
predicate isBarrier(DataFlow::Node node) { node instanceof ConstantPasswordSanitizer }
3232

3333
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
3434
any(ConstantPasswordAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/ConstantSaltExtensions.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class ConstantSaltAdditionalTaintStep extends Unit {
2828
abstract predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo);
2929
}
3030

31-
3231
/**
3332
* A sink for the CryptoSwift library.
3433
*/
@@ -47,13 +46,14 @@ private class CryptoSwiftSaltSink extends ConstantSaltSink {
4746
/**
4847
* A sink for the RNCryptor library.
4948
*/
50-
private class RnCryptorSaltSink extends ConstantSaltSink {
49+
private class RnCryptorSaltSink extends ConstantSaltSink {
5150
RnCryptorSaltSink() {
5251
exists(ClassOrStructDecl c, MethodDecl f, CallExpr call |
5352
c.getName() = ["RNCryptor", "RNEncryptor", "RNDecryptor"] and
5453
c.getAMember() = f and
5554
call.getStaticTarget() = f and
56-
call.getArgumentWithLabel(["salt", "encryptionSalt", "hmacSalt", "HMACSalt"]).getExpr() = this.asExpr()
55+
call.getArgumentWithLabel(["salt", "encryptionSalt", "hmacSalt", "HMACSalt"]).getExpr() =
56+
this.asExpr()
5757
)
5858
}
5959
}

swift/ql/lib/codeql/swift/security/ConstantSaltQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module ConstantSaltConfig implements DataFlow::ConfigSig {
2929

3030
predicate isSink(DataFlow::Node node) { node instanceof ConstantSaltSink }
3131

32-
predicate isBarrier(DataFlow::Node node) { node instanceof ConstantSaltSanitizer}
32+
predicate isBarrier(DataFlow::Node node) { node instanceof ConstantSaltSanitizer }
3333

3434
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
3535
any(ConstantSaltAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/ECBEncryptionQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module EcbEncryptionConfig implements DataFlow::ConfigSig {
1717

1818
predicate isSink(DataFlow::Node node) { node instanceof EcbEncryptionSink }
1919

20-
predicate isBarrier(DataFlow::Node node) { node instanceof EcbEncryptionSanitizer}
20+
predicate isBarrier(DataFlow::Node node) { node instanceof EcbEncryptionSanitizer }
2121

2222
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
2323
any(EcbEncryptionAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/HardcodedEncryptionKeyQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module HardcodedKeyConfig implements DataFlow::ConfigSig {
3434

3535
predicate isSink(DataFlow::Node node) { node instanceof HardcodedEncryptionKeySink }
3636

37-
predicate isBarrier(DataFlow::Node node) { node instanceof HardcodedEncryptionKeySanitizer}
37+
predicate isBarrier(DataFlow::Node node) { node instanceof HardcodedEncryptionKeySanitizer }
3838

3939
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
4040
any(HardcodedEncryptionKeyAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/InsufficientHashIterationsQuery.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import codeql.swift.security.InsufficientHashIterationsExtensions
1111
/**
1212
* An `Expr` that is used to initialize a password-based encryption key.
1313
*/
14-
private abstract class IterationsSource extends Expr { }
14+
abstract private class IterationsSource extends Expr { }
1515

1616
/**
1717
* A literal integer that is 120,000 or less is a source of taint for iterations.
@@ -29,7 +29,7 @@ module InsufficientHashIterationsConfig implements DataFlow::ConfigSig {
2929

3030
predicate isSink(DataFlow::Node node) { node instanceof InsufficientHashIterationsSink }
3131

32-
predicate isBarrier(DataFlow::Node node) { node instanceof InsufficientHashIterationsSanitizer}
32+
predicate isBarrier(DataFlow::Node node) { node instanceof InsufficientHashIterationsSanitizer }
3333

3434
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
3535
any(InsufficientHashIterationsAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/StaticInitializationVectorQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module StaticInitializationVectorConfig implements DataFlow::ConfigSig {
3030

3131
predicate isSink(DataFlow::Node node) { node instanceof StaticInitializationVectorSink }
3232

33-
predicate isBarrier(DataFlow::Node node) { node instanceof StaticInitializationVectorSanitizer}
33+
predicate isBarrier(DataFlow::Node node) { node instanceof StaticInitializationVectorSanitizer }
3434

3535
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
3636
any(StaticInitializationVectorAdditionalTaintStep s).step(nodeFrom, nodeTo)

swift/ql/lib/codeql/swift/security/WeakSensitiveDataHashingQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module WeakHashingConfig implements DataFlow::ConfigSig {
1414

1515
predicate isSink(DataFlow::Node node) { node instanceof WeakSensitiveDataHashingSink }
1616

17-
predicate isBarrier(DataFlow::Node node) { node instanceof WeakSensitiveDataHashingSanitizer}
17+
predicate isBarrier(DataFlow::Node node) { node instanceof WeakSensitiveDataHashingSanitizer }
1818

1919
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
2020
any(WeakSensitiveDataHashingAdditionalTaintStep s).step(nodeFrom, nodeTo)

0 commit comments

Comments
 (0)