Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cc0494

Browse files
committed
codeql format
1 parent bda1c21 commit 0cc0494

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

ruby/ql/lib/codeql/ruby/Concepts.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ module Cryptography {
888888
class BlockMode extends string {
889889
BlockMode() { this = ["ECB", "CBC", "GCM", "CCM", "CFB", "OFB", "CTR"] }
890890

891-
/** Holds if this block mode is considered to be insecure. */
892-
predicate isWeak() { this = "ECB" }
893-
}
891+
/** Holds if this block mode is considered to be insecure. */
892+
predicate isWeak() { this = "ECB" }
893+
}
894894
}

ruby/ql/test/library-tests/concepts/CryptographicOperation.ql

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ class CryptographicOperationTest extends InlineExpectationsTest {
77

88
override string getARelevantTag() {
99
result in [
10-
"CryptographicOperation", "CryptographicOperationInput", "CryptographicOperationAlgorithm",
11-
"CryptographicOperationBlockMode"
12-
]
10+
"CryptographicOperation", "CryptographicOperationInput", "CryptographicOperationAlgorithm",
11+
"CryptographicOperationBlockMode"
12+
]
1313
}
1414

1515
override predicate hasActualResult(Location location, string element, string tag, string value) {
1616
exists(location.getFile().getRelativePath()) and
1717
exists(Cryptography::CryptographicOperation cryptoOperation |
1818
location = cryptoOperation.getLocation() and
1919
(
20-
element = cryptoOperation.toString() and
21-
value = "" and
22-
tag = "CryptographicOperation"
23-
or
24-
element = cryptoOperation.toString() and
25-
value = cryptoOperation.getAlgorithm().getName() and
26-
tag = "CryptographicOperationAlgorithm"
27-
or
28-
element = cryptoOperation.toString() and
29-
value = cryptoOperation.getBlockMode() and
30-
tag = "CryptographicOperationBlockMode"
31-
)
20+
element = cryptoOperation.toString() and
21+
value = "" and
22+
tag = "CryptographicOperation"
23+
or
24+
element = cryptoOperation.toString() and
25+
value = cryptoOperation.getAlgorithm().getName() and
26+
tag = "CryptographicOperationAlgorithm"
27+
or
28+
element = cryptoOperation.toString() and
29+
value = cryptoOperation.getBlockMode() and
30+
tag = "CryptographicOperationBlockMode"
31+
)
3232
)
3333
}
3434
}

0 commit comments

Comments
 (0)