Changed python inventory subdirectory structure to add old and new inventory models. Added some example old models.

This commit is contained in:
Benjamin Rodes
2023-09-15 12:17:12 -04:00
committed by Josh Brown
parent 50db4fd63e
commit 5fed923af0
19 changed files with 62 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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()