Crypto: Example query reorg - moving queries of this PR into 'examples' subdirectories.

This commit is contained in:
REDMOND\brodes
2025-10-09 09:03:00 -04:00
parent deb43735be
commit fba80870a6
25 changed files with 13 additions and 14 deletions

View File

@@ -4,6 +4,7 @@
* @id java/quantum/unknown-kdf-iteration-count
* @kind problem
* @precision medium
* @problem.severity error
* @tags quantum
* experimental
*/

View File

@@ -12,13 +12,11 @@
import java
import experimental.quantum.Language
from Crypto::KeyOperationAlgorithmNode op, DataFlow::Node configSrc, int keySize, string algName
from Crypto::KeyOperationAlgorithmNode op, int keySize, string algName
where
keySize = op.getKeySizeFixed() and
keySize < 2048 and
algName = op.getAlgorithmName() and
// Can't be an elliptic curve
not Crypto::isEllipticCurveAlgorithmName(algName)
select op,
"Use of weak asymmetric key size (" + keySize.toString() + " bits) for algorithm " +
algName.toString() + " at config source $@", configSrc, configSrc.toString()
op.getAlgorithmType() != Crypto::KeyOpAlg::AlgorithmType::EllipticCurveType()
select "Use of weak asymmetric key size (" + keySize.toString() + " bits) for algorithm " + algName

View File

@@ -1,4 +0,0 @@
query: experimental/quantum/Analysis/InsecureIVorNonceSource.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1,4 +0,0 @@
query: experimental/quantum/Analysis/UnknownIVorNonceSource.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1 +0,0 @@
experimental/quantum/Analysis/ReusedNonce.ql

View File

@@ -0,0 +1,4 @@
query: experimental/quantum/Examples/InsecureIVorNonceSource.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -0,0 +1,4 @@
query: experimental/quantum/Examples/UnknownIVorNonceSource.ql
postprocess:
- utils/test/PrettyPrintModels.ql
- utils/test/InlineExpectationsTestQuery.ql

View File

@@ -0,0 +1 @@
experimental/quantum/Examples/ReusedNonce.ql