cyclonedx.model.definition
Classes
Helper class that allows us to perform validation on data strings that must conform to |
|
A requirement comprising a standard. |
|
Level of compliance for a standard. |
|
A standard of regulations, industry or organizational-specific standards, maturity models, best practices, |
|
The repository for definitions |
Module Contents
- class cyclonedx.model.definition.CreId(id: str)
Bases:
py_serializable.helpers.BaseHelperHelper class that allows us to perform validation on data strings that must conform to Common Requirements Enumeration (CRE) identifier(s).
- property id: str
- classmethod serialize(o: Any) str
- classmethod deserialize(o: Any) _T_CreId
- class cyclonedx.model.definition.Requirement(*, bom_ref: str | cyclonedx.model.bom_ref.BomRef | None = None, identifier: str | None = None, title: str | None = None, text: str | None = None, descriptions: collections.abc.Iterable[str] | None = None, open_cre: collections.abc.Iterable[CreId] | None = None, parent: str | cyclonedx.model.bom_ref.BomRef | None = None, properties: collections.abc.Iterable[cyclonedx.model.Property] | None = None, external_references: collections.abc.Iterable[cyclonedx.model.ExternalReference] | None = None)
A requirement comprising a standard.
Note
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/json/#definitions_standards_items_requirements
- property identifier: str | None
- Returns:
The identifier of the requirement.
- property title: str | None
- Returns:
The title of the requirement.
- property text: str | None
- Returns:
The text of the requirement.
- property descriptions: SortedSet[str]
- Returns:
A SortedSet of descriptions of the requirement.
- property open_cre: SortedSet[CreId]
CRE is a structured and standardized framework for uniting security standards and guidelines. CRE links each section of a resource to a shared topic identifier (a Common Requirement). Through this shared topic link, all resources map to each other. Use of CRE promotes clear and unambiguous communication among stakeholders.
- Returns:
The Common Requirements Enumeration (CRE) identifier(s). CREs must match regular expression: ^CRE:[0-9]+-[0-9]+$
- property parent: cyclonedx.model.bom_ref.BomRef | None
- Returns:
The optional bom-ref to a parent requirement. This establishes a hierarchy of requirements. Top-level requirements must not define a parent. Only child requirements should define parents.
- property properties: SortedSet[Property]
Provides the ability to document properties in a key/value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions.
- Return:
Set of Property
- property external_references: SortedSet[ExternalReference]
Provides the ability to document external references related to the component or to the project the component describes.
- Returns:
Set of ExternalReference
- property bom_ref: cyclonedx.model.bom_ref.BomRef
An optional identifier which can be used to reference the requirement elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
- Returns:
BomRef
- class cyclonedx.model.definition.Level(*, bom_ref: str | cyclonedx.model.bom_ref.BomRef | None = None, identifier: str | None = None, title: str | None = None, description: str | None = None, requirements: collections.abc.Iterable[str | cyclonedx.model.bom_ref.BomRef] | None = None)
Level of compliance for a standard.
Note
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/json/#definitions_standards_items_levels
- property identifier: str | None
- Returns:
The identifier of the level.
- property title: str | None
- Returns:
The title of the level.
- property description: str | None
- Returns:
The description of the level.
- property requirements: SortedSet[BomRef]
- Returns:
A SortedSet of requirements associated with the level.
- property bom_ref: cyclonedx.model.bom_ref.BomRef
An optional identifier which can be used to reference the level elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
- Returns:
BomRef
- class cyclonedx.model.definition.Standard(*, bom_ref: str | cyclonedx.model.bom_ref.BomRef | None = None, name: str | None = None, version: str | None = None, description: str | None = None, owner: str | None = None, requirements: collections.abc.Iterable[Requirement] | None = None, levels: collections.abc.Iterable[Level] | None = None, external_references: collections.abc.Iterable[cyclonedx.model.ExternalReference] | None = None)
A standard of regulations, industry or organizational-specific standards, maturity models, best practices, or any other requirements.
Note
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_standard
- property name: str | None
- Returns:
The name of the standard
- property version: str | None
- Returns:
The version of the standard
- property description: str | None
- Returns:
The description of the standard
- property owner: str | None
- Returns:
The owner of the standard, often the entity responsible for its release.
- property requirements: SortedSet[Requirement]
- Returns:
A SortedSet of requirements comprising the standard.
- property levels: SortedSet[Level]
- Returns:
A SortedSet of levels associated with the standard. Some standards have different levels of compliance.
- property external_references: SortedSet[ExternalReference]
- Returns:
A SortedSet of external references associated with the standard.
- property bom_ref: cyclonedx.model.bom_ref.BomRef
An optional identifier which can be used to reference the standard elsewhere in the BOM. Every bom-ref MUST be unique within the BOM.
- Returns:
BomRef
- class cyclonedx.model.definition.Definitions(*, standards: collections.abc.Iterable[Standard] | None = None)
The repository for definitions
Note
See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_definitionsType