mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Crypto: Fixed bug in WeakSymmetricCipher.qll, forgot to not only filter if !=AES but the algorithm must still be a SymmetriCipher algorithm.
This commit is contained in:
@@ -8,7 +8,8 @@ predicate isUnapprovedSymmetricCipher(Crypto::KeyOperationAlgorithmNode alg, str
|
||||
exists(KeyOpAlg::AlgorithmType algType |
|
||||
algType = alg.getAlgorithmType() and
|
||||
msg = "Use of unapproved symmetric cipher algorithm or API: " + algType.toString() + "." and
|
||||
algType != KeyOpAlg::TSymmetricCipher(KeyOpAlg::AES())
|
||||
algType != KeyOpAlg::TSymmetricCipher(KeyOpAlg::AES()) and
|
||||
algType instanceof KeyOpAlg::TSymmetricCipher
|
||||
)
|
||||
// NOTE: an org could decide to disallow very specific algorithms as well, shown below
|
||||
// (
|
||||
|
||||
Reference in New Issue
Block a user