cyclonedx.model.data
This set of classes represents the component data types in the CycloneDX standard.
Note
Introduced in CycloneDX v1.5.
Note
See the CycloneDX Schema for component data:
Classes
Enumeration for componentDataTypeEnumeration: the type of data. |
|
Contents or references to the contents of the data being described. |
|
A party that is responsible for data: either an organization or an individual. |
|
Governance of the data: its custodians, stewards and owners. |
|
Inline data of a component, as defined by componentDataType: a dataset, source code, configuration, etc. |
|
A reference to a data component, as used by modelCard.modelParameters.datasets. |
Module Contents
- class cyclonedx.model.data.ComponentDataKind
Bases:
str,enum.EnumEnumeration for componentDataTypeEnumeration: the type of data.
- SOURCE_CODE = 'source-code'
- CONFIGURATION = 'configuration'
- DATASET = 'dataset'
- DEFINITION = 'definition'
- OTHER = 'other'
- class cyclonedx.model.data.DataContents(*, attachment: cyclonedx.model.AttachedText | None = None, url: cyclonedx.model.XsUri | None = None, properties: collections.abc.Iterable[cyclonedx.model.Property] | None = None)
Contents or references to the contents of the data being described.
- property attachment: cyclonedx.model.AttachedText | None
An optional way to include textual or encoded data.
- Returns:
AttachedText if set else None
- property url: cyclonedx.model.XsUri | None
The URL to where the data can be retrieved.
- Returns:
XsUri if set else None
- class cyclonedx.model.data.DataGovernanceResponsibleParty(*, organization: cyclonedx.model.contact.OrganizationalEntity | None = None, contact: cyclonedx.model.contact.OrganizationalContact | None = None)
A party that is responsible for data: either an organization or an individual.
Exactly one of organization and contact MUST be supplied, as required by the JSON schema.
- property organization: cyclonedx.model.contact.OrganizationalEntity | None
The organization that is responsible for the data.
- Returns:
OrganizationalEntity if set else None
- property contact: cyclonedx.model.contact.OrganizationalContact | None
The individual that is responsible for the data.
- Returns:
OrganizationalContact if set else None
- class cyclonedx.model.data.DataGovernance(*, custodians: collections.abc.Iterable[DataGovernanceResponsibleParty] | None = None, stewards: collections.abc.Iterable[DataGovernanceResponsibleParty] | None = None, owners: collections.abc.Iterable[DataGovernanceResponsibleParty] | None = None)
Governance of the data: its custodians, stewards and owners.
- property custodians: SortedSet[DataGovernanceResponsibleParty]
Data custodians are responsible for the safe custody, transport, and storage of data.
- Returns:
Set of DataGovernanceResponsibleParty
- property stewards: SortedSet[DataGovernanceResponsibleParty]
Data stewards are responsible for data content, context, and associated business rules.
- Returns:
Set of DataGovernanceResponsibleParty
- property owners: SortedSet[DataGovernanceResponsibleParty]
Data owners are concerned with risk and appropriate access to data.
- Returns:
Set of DataGovernanceResponsibleParty
- class cyclonedx.model.data.ComponentData(*, type: ComponentDataKind, bom_ref: str | cyclonedx.model.bom_ref.BomRef | None = None, name: str | None = None, contents: DataContents | None = None, classification: str | None = None, sensitive_data: collections.abc.Iterable[str] | None = None, graphics: cyclonedx.model.graphics.GraphicsCollection | None = None, description: str | None = None, governance: DataGovernance | None = None)
Inline data of a component, as defined by componentDataType: a dataset, source code, configuration, etc.
- property type: ComponentDataKind
The general theme or subject matter of the data being specified.
- Returns:
ComponentDataKind
- property name: str | None
The name of the dataset.
- Returns:
str if set else None
- property contents: DataContents | None
The contents or references to the contents of the data being described.
- Returns:
DataContents if set else None
- property classification: str | None
Data classification tags data according to its type, sensitivity, and value if altered, stolen, or destroyed.
- Returns:
str if set else None
- property sensitive_data: SortedSet[str]
A description of any sensitive data in a dataset.
- Returns:
Set of str
- property graphics: cyclonedx.model.graphics.GraphicsCollection | None
A collection of graphics that represent various measurements.
- Returns:
GraphicsCollection if set else None
- property description: str | None
A description of the dataset. Can describe size of dataset, whether it’s downloadable, etc.
- Returns:
str if set else None
- property governance: DataGovernance | None
Data governance captures information regarding data ownership, stewardship, and custodianship.
- Returns:
DataGovernance if set else None
- property bom_ref: cyclonedx.model.bom_ref.BomRef
An identifier which can be used to reference the data elsewhere in the BOM. Every bom-ref must be unique within the BOM.
- Returns:
BomRef
- class cyclonedx.model.data.DatasetReference(*, ref: str | cyclonedx.model.bom_ref.BomRef | cyclonedx.model.XsUri)
A reference to a data component, as used by modelCard.modelParameters.datasets.
The reference is either the bom-ref of a data component in the same BOM, or a BOM-Link (urn:cdx:…) to an element of another BOM.
Note
Serialization is handled by
cyclonedx.model.model_card.ModelParameters.datasets.- property ref: str | cyclonedx.model.bom_ref.BomRef | cyclonedx.model.XsUri
The bom-ref of a data component, or a BOM-Link to one.
- Returns:
str, BomRef or XsUri