mirror of
https://github.com/github/codeql.git
synced 2026-02-16 23:13:43 +01:00
Crypto: altering all query IDs in examples to have "examples" in the ID, to make clear the query is not intended for production.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @name Weak AES Block mode
|
||||
* @id java/quantum/weak-block-modes
|
||||
* @id java/quantum/examples/weak-block-modes
|
||||
* @description An AES cipher is in use with an insecure block mode
|
||||
* @kind problem
|
||||
* @problem.severity error
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @name Weak hashes
|
||||
* @description Finds uses of cryptographic hashing algorithms that are unapproved or otherwise weak.
|
||||
* @id java/quantum/weak-hash
|
||||
* @id java/quantum/examples/weak-hash
|
||||
* @kind problem
|
||||
* @problem.severity error
|
||||
* @tags external/cwe/cwe-327
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @name Weak known key derivation function iteration count
|
||||
* @description Detects key derivation operations with a known weak iteration count.
|
||||
* @id java/quantum/weak-kdf-iteration-count
|
||||
* @id java/quantum/examples/weak-kdf-iteration-count
|
||||
* @kind path-problem
|
||||
* @problem.severity error
|
||||
* @tags quantum
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @name Weak known key derivation function output length
|
||||
* @description Detects key derivation operations with a known weak output length
|
||||
* @id java/quantum/weak-kdf-key-size
|
||||
* @id java/quantum/examples/weak-kdf-key-size
|
||||
* @kind path-problem
|
||||
* @problem.severity error
|
||||
* @tags quantum
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @name Weak symmetric ciphers
|
||||
* @description Finds uses of cryptographic symmetric cipher algorithms that are unapproved or otherwise weak.
|
||||
* @id java/quantum/weak-ciphers
|
||||
* @id java/quantum/examples/weak-ciphers
|
||||
* @kind problem
|
||||
* @problem.severity error
|
||||
* @tags external/cwe/cwe-327
|
||||
@@ -16,6 +16,9 @@ import Crypto::KeyOpAlg as KeyOpAlg
|
||||
from Crypto::KeyOperationAlgorithmNode alg, KeyOpAlg::AlgorithmType algType
|
||||
where
|
||||
algType = alg.getAlgorithmType() and
|
||||
// NOTE: an org may disallow all but AES we could similarly look for
|
||||
// algType != KeyOpAlg::TSymmetricCipher(KeyOpAlg::AES())
|
||||
// This is a more comprehensive check than looking for all weak ciphers
|
||||
(
|
||||
algType = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DES()) or
|
||||
algType = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TRIPLE_DES()) or
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @name Operations with unknown algorithm
|
||||
* @description Outputs operations where the algorithm applied is unknown
|
||||
* @id java/quantum/slices/operation-with-unknown-algorithm
|
||||
* @id java/quantum/examples/slices/operation-with-unknown-algorithm
|
||||
* @kind problem
|
||||
* @severity info
|
||||
* @tags quantum
|
||||
|
||||
Reference in New Issue
Block a user