Skip to content

Commit 94d5f3b

Browse files
committed
Ruby: Add rb/weak-cryptographic-algorithm query
1 parent 40b87e6 commit 94d5f3b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @name Use of a broken or weak cryptographic algorithm
3+
* @description Using broken or weak cryptographic algorithms can compromise security.
4+
* @kind problem
5+
* @problem.severity warning
6+
* @security-severity 7.5
7+
* @precision high
8+
* @id rb/weak-cryptographic-algorithm
9+
* @tags security
10+
* external/cwe/cwe-327
11+
*/
12+
13+
import ruby
14+
import codeql.ruby.Concepts
15+
16+
from Cryptography::CryptographicOperation operation
17+
where operation.isWeak()
18+
select operation,
19+
"The cryptographic algorithm " + operation.getAlgorithm().getName() +
20+
" is broken or weak, and should not be used."

0 commit comments

Comments
 (0)