cyclonedx.model.component ========================= .. py:module:: cyclonedx.model.component Attributes ---------- .. autoapisummary:: cyclonedx.model.component.COMPONENT_SCOPE_VERSIONS Classes ------- .. autoapisummary:: cyclonedx.model.component.Commit cyclonedx.model.component.ComponentScope cyclonedx.model.component.ComponentType cyclonedx.model.component.Diff cyclonedx.model.component.PatchClassification cyclonedx.model.component.Patch cyclonedx.model.component.Pedigree cyclonedx.model.component.Swid cyclonedx.model.component.OmniborId cyclonedx.model.component.Swhid cyclonedx.model.component.Component Module Contents --------------- .. py:class:: Commit Our internal representation of the `commitType` complex type. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_commitType .. py:attribute:: uid :type: Optional[str] .. py:attribute:: url :type: Optional[cyclonedx.model.XsUri] .. py:attribute:: author :type: Optional[cyclonedx.model.IdentifiableAction] .. py:attribute:: committer :type: Optional[cyclonedx.model.IdentifiableAction] .. py:attribute:: message :type: Optional[str] .. py:class:: ComponentScope Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enum object that defines the permissable 'scopes' for a Component according to the CycloneDX schema. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_scope .. py:attribute:: REQUIRED :value: 'required' .. py:attribute:: OPTIONAL :value: 'optional' .. py:attribute:: EXCLUDED :value: 'excluded' .. py:data:: COMPONENT_SCOPE_VERSIONS :type: dict[ComponentScope, set[cyclonedx.schema.SchemaVersion]] .. py:class:: ComponentType Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enum object that defines the permissible 'types' for a Component according to the CycloneDX schema. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_classification .. py:attribute:: APPLICATION :value: 'application' .. py:attribute:: CONTAINER :value: 'container' .. py:attribute:: CRYPTOGRAPHIC_ASSET :value: 'cryptographic-asset' .. py:attribute:: DATA :value: 'data' .. py:attribute:: DEVICE :value: 'device' .. py:attribute:: DEVICE_DRIVER :value: 'device-driver' .. py:attribute:: FILE :value: 'file' .. py:attribute:: FIRMWARE :value: 'firmware' .. py:attribute:: FRAMEWORK :value: 'framework' .. py:attribute:: LIBRARY :value: 'library' .. py:attribute:: MACHINE_LEARNING_MODEL :value: 'machine-learning-model' .. py:attribute:: OPERATING_SYSTEM :value: 'operating-system' .. py:attribute:: PLATFORM :value: 'platform' .. py:class:: Diff Our internal representation of the `diffType` complex type. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_diffType .. py:attribute:: text :type: Optional[cyclonedx.model.AttachedText] .. py:attribute:: url :type: Optional[cyclonedx.model.XsUri] .. py:class:: PatchClassification Bases: :py:obj:`str`, :py:obj:`enum.Enum` Enum object that defines the permissible `patchClassification`s. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_patchClassification .. py:attribute:: BACKPORT :value: 'backport' .. py:attribute:: CHERRY_PICK :value: 'cherry-pick' .. py:attribute:: MONKEY :value: 'monkey' .. py:attribute:: UNOFFICIAL :value: 'unofficial' .. py:class:: Patch Our internal representation of the `patchType` complex type. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_patchType .. py:attribute:: type :type: PatchClassification .. py:attribute:: diff :type: Optional[Diff] .. py:attribute:: resolves :type: SortedSet[IssueType] .. py:class:: Pedigree Our internal representation of the `pedigreeType` complex type. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_pedigreeType .. py:attribute:: ancestors :type: SortedSet[Component] .. py:attribute:: descendants :type: SortedSet[Component] .. py:attribute:: variants :type: SortedSet[Component] .. py:attribute:: commits :type: SortedSet[Commit] .. py:attribute:: patches :type: SortedSet[Patch] .. py:attribute:: notes :type: Optional[str] .. py:class:: Swid Our internal representation of the `swidType` complex type. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_swidType .. py:attribute:: tag_id :type: str .. py:attribute:: name :type: str .. py:attribute:: version :type: Optional[str] .. py:attribute:: tag_version :type: Optional[int] .. py:attribute:: patch :type: Optional[bool] .. py:attribute:: text :type: Optional[cyclonedx.model.AttachedText] .. py:attribute:: url :type: Optional[cyclonedx.model.XsUri] .. py:class:: OmniborId(id: str) Helper class that allows us to perform validation on data strings that must conform to https://www.iana.org/assignments/uri-schemes/prov/gitoid. .. py:property:: id :type: str .. py:method:: serialize(o: Any) -> str :classmethod: .. py:method:: deserialize(o: Any) -> OmniborId :classmethod: .. py:class:: Swhid(id: str) Helper class that allows us to perform validation on data strings that must conform to https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html. .. py:property:: id :type: str .. py:method:: serialize(o: Any) -> str :classmethod: .. py:method:: deserialize(o: Any) -> Swhid :classmethod: .. py:class:: Component Bases: :py:obj:`cyclonedx.model.dependency.Dependable` This is our internal representation of a Component within a Bom. .. note:: See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_component .. py:attribute:: name :type: str .. py:attribute:: type :type: ComponentType .. py:attribute:: bom_ref :type: cyclonedx.model.bom_ref.BomRef .. py:attribute:: mime_type :type: Optional[str] .. py:attribute:: supplier :type: Optional[cyclonedx.model.contact.OrganizationalEntity] .. py:attribute:: manufacturer :type: Optional[cyclonedx.model.contact.OrganizationalEntity] .. py:attribute:: authors :type: SortedSet[OrganizationalContact] .. py:attribute:: author :type: Optional[str] .. py:attribute:: publisher :type: Optional[str] .. py:attribute:: group :type: Optional[str] .. py:attribute:: version :type: Optional[str] .. py:attribute:: description :type: Optional[str] .. py:attribute:: scope :type: Optional[ComponentScope] .. py:attribute:: hashes :type: SortedSet[HashType] .. py:attribute:: licenses :type: cyclonedx.model.license.LicenseRepository .. py:attribute:: copyright :type: Optional[str] .. py:attribute:: cpe :type: Optional[str] .. py:attribute:: purl :type: Optional[packageurl.PackageURL] .. py:attribute:: omnibor_ids :type: SortedSet[OmniborId] .. py:attribute:: swhids :type: SortedSet[Swhid] .. py:attribute:: swid :type: Optional[Swid] .. py:attribute:: modified :type: bool .. py:attribute:: pedigree :type: Optional[Pedigree] .. py:attribute:: external_references :type: SortedSet[ExternalReference] .. py:attribute:: properties :type: SortedSet[Property] .. py:attribute:: components :type: SortedSet[Component] .. py:attribute:: evidence :type: Optional[cyclonedx.model.component_evidence.ComponentEvidence] .. py:attribute:: release_notes :type: Optional[cyclonedx.model.release_note.ReleaseNotes] .. py:attribute:: crypto_properties :type: Optional[cyclonedx.model.crypto.CryptoProperties] .. py:attribute:: tags :type: SortedSet[str] .. py:method:: for_file(absolute_file_path: str, path_for_bom: Optional[str]) -> Component :staticmethod: Deprecated — Wrapper of :func:`cyclonedx.contrib.component.builders.ComponentBuilder.make_for_file`. .. py:method:: get_all_nested_components(include_self: bool = False) -> set[Component] .. py:method:: get_pypi_url() -> str