mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Exclude broken algorithms from the list of secure algorithms
This commit is contained in:
@@ -99,7 +99,7 @@ string getAnInsecureAlgorithmName() {
|
||||
result = "RC5" or
|
||||
result = "ARCFOUR" or // a variant of RC4
|
||||
result = "ECB" or // encryption mode ECB like AES/ECB/NoPadding is vulnerable to replay and other attacks
|
||||
result = "AES/CBC/PKCS5Padding" // CBC mode of operation with PKCS#5 (or PKCS#7) padding is vulnerable to padding oracle attacks
|
||||
result = "AES/CBC/PKCS[5|7]Padding" // CBC mode of operation with PKCS#5 (or PKCS#7) padding is vulnerable to padding oracle attacks
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +141,7 @@ string getASecureAlgorithmName() {
|
||||
result = "SHA512" or
|
||||
result = "CCM" or
|
||||
result = "GCM" or
|
||||
result = "AES" or
|
||||
result = "AES([^a-zA-Z](?!ECB|CBC/PKCS[5|7]Padding)).*" or
|
||||
result = "Blowfish" or
|
||||
result = "ECIES"
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ class Test {
|
||||
"AES/ECB/NoPadding",
|
||||
"AES/CBC/PKCS5Padding");
|
||||
|
||||
|
||||
List<String> goodStrings = Arrays.asList(
|
||||
"AES",
|
||||
"AES_function",
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| Test.java:35:4:35:17 | super(...) | Test.java:35:10:35:15 | "some" |
|
||||
| Test.java:39:3:39:38 | getInstance(...) | Test.java:39:29:39:37 | "another" |
|
||||
| Test.java:37:4:37:17 | super(...) | Test.java:37:10:37:15 | "some" |
|
||||
| Test.java:41:3:41:38 | getInstance(...) | Test.java:41:29:41:37 | "another" |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| Test.java:16:4:16:8 | "AES" |
|
||||
| Test.java:17:4:17:17 | "AES_function" |
|
||||
| Test.java:18:4:18:8 | "AES" |
|
||||
| Test.java:19:4:19:17 | "AES_function" |
|
||||
|
||||
Reference in New Issue
Block a user