mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Changed python inventory subdirectory structure to add old and new inventory models. Added some example old models.
This commit is contained in:
committed by
Josh Brown
parent
50db4fd63e
commit
5fed923af0
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @name All Cryptographic Algorithms
|
||||
* @description Finds all potential usage of cryptographic algorithms usage using the supported libraries.
|
||||
* @kind problem
|
||||
* @id py/quantum-readiness/cbom/classic-model/all-cryptographic-algorithms
|
||||
* @problem.severity error
|
||||
* @precision high
|
||||
* @tags security
|
||||
* cbom
|
||||
* cryptography
|
||||
*/
|
||||
|
||||
import python
|
||||
import semmle.python.Concepts
|
||||
|
||||
from Cryptography::CryptographicOperation operation, string algName
|
||||
where
|
||||
algName = operation.getAlgorithm().getName()
|
||||
or
|
||||
algName = operation.getBlockMode()
|
||||
select operation, "Use of algorithm " + algName
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @name Block cipher mode of operation
|
||||
* @description Finds all potential block cipher modes of operations using the supported libraries.
|
||||
* @kind problem
|
||||
* @id py/quantum-readiness/cbom/classic-model/block-cipher-mode
|
||||
* @problem.severity error
|
||||
* @precision high
|
||||
* @tags security
|
||||
* cbom
|
||||
* cryptography
|
||||
*/
|
||||
|
||||
import python
|
||||
import semmle.python.Concepts
|
||||
|
||||
from Cryptography::CryptographicOperation operation, string algName
|
||||
where algName = operation.getBlockMode()
|
||||
select operation, "Use of algorithm " + algName
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @name Hash Algorithms
|
||||
* @description Finds all potential usage of cryptographic hash algorithms using the supported libraries.
|
||||
* @kind problem
|
||||
* @id py/quantum-readiness/cbom/classic-model/hash-algorithms
|
||||
* @problem.severity error
|
||||
* @precision high
|
||||
* @tags security
|
||||
* cbom
|
||||
* cryptography
|
||||
*/
|
||||
|
||||
import python
|
||||
import semmle.python.Concepts
|
||||
|
||||
from Cryptography::CryptographicOperation operation, Cryptography::CryptographicAlgorithm algorithm
|
||||
where
|
||||
algorithm = operation.getAlgorithm() and
|
||||
(
|
||||
algorithm instanceof Cryptography::HashingAlgorithm or
|
||||
algorithm instanceof Cryptography::PasswordHashingAlgorithm
|
||||
)
|
||||
select operation, "Use of algorithm " + operation.getAlgorithm().getName()
|
||||
Reference in New Issue
Block a user