mirror of
https://github.com/github/codeql.git
synced 2026-02-16 23:13:43 +01:00
Update slice query metadata and output tables
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects known asymmetric algorithms
|
||||
* @id java/crypto_inventory_slices/known_asymmetric_algorithm
|
||||
* @name Operations using known asymmetric cipher algorithms (slice)
|
||||
* @description Outputs operations where the algorithm used is a known asymmetric cipher algorithm.
|
||||
* @id java/quantum/slices/known-asymmetric-cipher-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::AlgorithmNode a
|
||||
where Crypto::isKnownAsymmetricAlgorithm(a)
|
||||
select a, "Instance of asymmetric algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects known asymmetric cipher algorithms
|
||||
* @id java/crypto_inventory_slices/known_asymmetric_cipher_algorithm
|
||||
* @name Known asymmetric cipher algorithms (slice)
|
||||
* @description Outputs known asymmetric cipher algorithms.
|
||||
* @id java/quantum/slices/known-asymmetric-cipher-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::KeyOperationAlgorithmNode a
|
||||
where a.getAlgorithmType() instanceof Crypto::KeyOpAlg::AsymmetricCipherAlgorithm
|
||||
select a, "Instance of asymmetric cipher algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects operations where the algorithm applied is a known asymmetric algorithms
|
||||
* @id java/crypto_inventory_slices/known_asymmetric_operation_algorithm
|
||||
* @name Operations using known asymmetric algorithms (slice)
|
||||
* @description Outputs operations where the algorithm used is a known asymmetric algorithm.
|
||||
* @id java/quantum/slices/known-asymmetric-operation-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::OperationNode op, Crypto::AlgorithmNode a
|
||||
where a = op.getAKnownAlgorithm() and Crypto::isKnownAsymmetricAlgorithm(a)
|
||||
select op, "Operation using asymmetric algorithm $@", a, a.getAlgorithmName()
|
||||
select op, a.getAlgorithmName()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects known cipher algorithms
|
||||
* @id java/crypto_inventory_slices/known_cipher_algorithm
|
||||
* @name Known cipher algorithms (slice)
|
||||
* @description Outputs known cipher algorithms.
|
||||
* @id java/quantum/slices/known-cipher-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -12,4 +15,4 @@ from Crypto::KeyOperationAlgorithmNode a
|
||||
where
|
||||
a.getAlgorithmType() instanceof Crypto::KeyOpAlg::AsymmetricCipherAlgorithm or
|
||||
a.getAlgorithmType() instanceof Crypto::KeyOpAlg::SymmetricCipherAlgorithm
|
||||
select a, "Instance of cipher algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* @name Detects known elliptic curve algorithms
|
||||
* @id java/crypto_inventory_slices/known_elliptic_curve_algorithm
|
||||
* @name Known elliptic curve algorithms (slice)
|
||||
* @description Outputs known elliptic curve algorithms.
|
||||
* @id java/quantum/slices/known-elliptic-curve-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
import experimental.quantum.Language
|
||||
|
||||
from Crypto::EllipticCurveNode a
|
||||
select a, "Instance of elliptic curve algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* @name Detects algorithms that are known hashing algorithms
|
||||
* @id java/crypto_inventory_slices/known_hashing_algorithm
|
||||
* @name Known hashing algorithms (slice)
|
||||
* @description Outputs known hashing algorithms.
|
||||
* @id java/quantum/slices/known-hashing-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
import experimental.quantum.Language
|
||||
|
||||
from Crypto::HashAlgorithmNode a
|
||||
select a, "Instance of hashing algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* @name Detects uses of hashing operations (operations exlicitly for hashing only, irrespective of the algorithm used)
|
||||
* @id java/crypto_inventory_slices/known_hashing_operation
|
||||
* @name Known hashing operations (slice)
|
||||
* @description Outputs known hashing operations.
|
||||
* @id java/quantum/slices/known-hashing-operation
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
import experimental.quantum.Language
|
||||
|
||||
from Crypto::HashOperationNode op
|
||||
select op, "Known hashing operation"
|
||||
select op
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects operations where the algorithm applied is a known hashing algorithm
|
||||
* @id java/crypto_inventory_slices/operation_with_known_hashing_algorithm
|
||||
* @name Operations using known hashing algorithms (slice)
|
||||
* @description Outputs operations where the algorithm used is a known hashing algorithm.
|
||||
* @id java/quantum/slices/operation-with-known-hashing-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::OperationNode op, Crypto::HashAlgorithmNode a
|
||||
where a = op.getAKnownAlgorithm()
|
||||
select op, "Operation using hashing algorithm $@", a, a.getAlgorithmName()
|
||||
select op, a.getAlgorithmName()
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* @name Detects known key derivation algorithms
|
||||
* @id java/crypto_inventory_slices/known_key_derivation_algorithm
|
||||
* @name Known key derivation algorithms (slice)
|
||||
* @description Outputs known key derivation algorithms.
|
||||
* @id java/quantum/slices/known-key-derivation-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
import experimental.quantum.Language
|
||||
|
||||
from Crypto::KeyDerivationAlgorithmNode alg
|
||||
select alg, "Known key derivation algorithm " + alg.getAlgorithmName()
|
||||
select alg, alg.getAlgorithmName()
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/**
|
||||
* @name Detects uses of key derivation operations (operations exlicitly for key derivation only, irrespective of the algorithm used)
|
||||
* @id java/crypto_inventory_slices/known_key_derivation_operation
|
||||
* @name Known key derivation operations (slice)
|
||||
* @description Outputs known key derivation operations.
|
||||
* @id java/quantum/slices/known-key-derivation-operation
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
import experimental.quantum.Language
|
||||
|
||||
from Crypto::KeyDerivationOperationNode op
|
||||
select op, "Known key derivation operation"
|
||||
select op
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects operations where the algorithm applied is a known key derivation algorithm
|
||||
* @id java/crypto_inventory_slices/operation_known_key_derivation_algorithm
|
||||
* @name Operations using known key derivation algorithms (slice)
|
||||
* @description Outputs operations where the algorithm used is a known key derivation algorithm.
|
||||
* @id java/quantum/slices/operation-with-known-kdf-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::OperationNode op, Crypto::KeyDerivationAlgorithmNode a
|
||||
where a = op.getAKnownAlgorithm()
|
||||
select op, "Operation using key derivation algorithm $@", a, a.getAlgorithmName()
|
||||
select op, a.getAlgorithmName()
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/**
|
||||
* @name Detects known symmetric cipher algorithms
|
||||
* @id java/crypto_inventory_slices/known_symmetric_cipher_algorithm
|
||||
* @name Known symmetric cipher algorithms (slice)
|
||||
* @description Outputs known symmetric cipher algorithms.
|
||||
* @id java/quantum/slices/known-symmetric-cipher-algorithm
|
||||
* @kind table
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
@@ -9,4 +12,4 @@ import experimental.quantum.Language
|
||||
|
||||
from Crypto::KeyOperationAlgorithmNode a
|
||||
where a.getAlgorithmType() instanceof Crypto::KeyOpAlg::SymmetricCipherAlgorithm
|
||||
select a, "Instance of symmetric cipher algorithm " + a.getAlgorithmName()
|
||||
select a, a.getAlgorithmName()
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/**
|
||||
* @name Detects functions that take in crypto configuration parameters but calls are not detected in source.
|
||||
* @id java/crypto_inventory_slices/likely_crypto_api_function
|
||||
* @kind table
|
||||
* @name Likely crypto API function
|
||||
* @description Detects functions that take in crypto configuration parameters but calls are not detected in source.
|
||||
* @id java/quantum/slices/likely-crypto-api-function
|
||||
* @kind problem
|
||||
* @severity info
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/**
|
||||
* @name Detects operations where the algorithm applied is unknown
|
||||
* @id java/crypto_inventory_slices/unknown_operation_algorithm
|
||||
* @kind table
|
||||
* @name Operations with unknown algorithm
|
||||
* @description Outputs operations where the algorithm applied is unknown
|
||||
* @id java/quantum/slices/operation-with-unknown-algorithm
|
||||
* @kind problem
|
||||
* @severity info
|
||||
* @tags quantum
|
||||
* experimental
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
Reference in New Issue
Block a user