mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Add crypto test with AES-ECB
This commit is contained in:
@@ -17,3 +17,6 @@ unknownCipher.update(secretText, 'utf8', 'hex'); // OK: unknown algorithm
|
||||
desCipher.write(o.trusted, 'utf8', 'hex'); // BAD
|
||||
|
||||
desCipher.write(password, 'utf8', 'hex'); // OK (flagged by js/insufficient-password-hash)
|
||||
|
||||
const aesEcbCipher = crypto.createCipher('aes-128-ecb', key);
|
||||
aesEcbCipher.update(secretText, 'utf8', 'hex'); // BAD
|
||||
|
||||
Reference in New Issue
Block a user