mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
feat: add rsa/ecb/... variants to the list of secure algorithms
This commit is contained in:
committed by
Rakshith Gopalakrishna
parent
ad2eacfd2f
commit
dd223ed704
@@ -15,6 +15,7 @@ private class ShortStringLiteral extends StringLiteral {
|
||||
class BrokenAlgoLiteral extends ShortStringLiteral {
|
||||
BrokenAlgoLiteral() {
|
||||
this.getValue().regexpMatch(getInsecureAlgorithmRegex()) and
|
||||
not this.getValue().regexpMatch(getASecureAlgorithmName()) and
|
||||
// Exclude German and French sentences.
|
||||
not this.getValue().regexpMatch(".*\\p{IsLowercase} des \\p{IsLetter}.*")
|
||||
}
|
||||
|
||||
@@ -250,7 +250,8 @@ string getASecureAlgorithmName() {
|
||||
result =
|
||||
[
|
||||
"RSA", "SHA-?256", "SHA-?512", "CCM", "GCM", "AES(?)",
|
||||
"Blowfish", "ECIES"
|
||||
"Blowfish", "ECIES", "RSA/ECB/OAEPWithSHA-1AndMGF1Padding", "RSA/ECB/PKCS1Padding",
|
||||
"RSA/ECB/OAEPWithSHA-256AndMGF1Padding"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user