mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Ruby: Add rb/weak-cryptographic-algorithm query
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @name Use of a broken or weak cryptographic algorithm
|
||||
* @description Using broken or weak cryptographic algorithms can compromise security.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 7.5
|
||||
* @precision high
|
||||
* @id rb/weak-cryptographic-algorithm
|
||||
* @tags security
|
||||
* external/cwe/cwe-327
|
||||
*/
|
||||
|
||||
import ruby
|
||||
import codeql.ruby.Concepts
|
||||
|
||||
from Cryptography::CryptographicOperation operation
|
||||
where operation.isWeak()
|
||||
select operation,
|
||||
"The cryptographic algorithm " + operation.getAlgorithm().getName() +
|
||||
" is broken or weak, and should not be used."
|
||||
Reference in New Issue
Block a user