cyclonedx.model.annotation

Classes

Annotator

The organization, person, component, or service which created the textual content of the annotation.

Annotation

A comment, note, explanation, or similar textual content which provides additional context

Module Contents

class cyclonedx.model.annotation.Annotator(*, organization: cyclonedx.model.contact.OrganizationalEntity | None = None, individual: cyclonedx.model.contact.OrganizationalContact | None = None, component: cyclonedx.model.component.Component | None = None, service: cyclonedx.model.service.Service | None = None)

The organization, person, component, or service which created the textual content of the annotation.

Note

Exactly one of organization, individual, component, or service must be provided. While properties can be modified independently after construction, having none or multiple set will produce schema-invalid output.

property organization: cyclonedx.model.contact.OrganizationalEntity | None
property individual: cyclonedx.model.contact.OrganizationalContact | None
property component: cyclonedx.model.component.Component | None
property service: cyclonedx.model.service.Service | None
class cyclonedx.model.annotation.Annotation(*, subjects: collections.abc.Iterable[cyclonedx.model.bom_ref.BomRef | str], annotator: Annotator, timestamp: datetime.datetime, text: str, bom_ref: str | cyclonedx.model.bom_ref.BomRef | None = None)

A comment, note, explanation, or similar textual content which provides additional context to the object(s) being annotated.

Note

While CycloneDX schema does not enforce minItems for subjects, an annotation with no subjects is semantically meaningless and may produce invalid XML output.

property subjects: SortedSet[BomRef]

The object(s) in the BOM identified by its bom-ref.

Note

While CycloneDX schema does not enforce minItems for subjects, an annotation with no subjects is semantically meaningless and may produce invalid XML output.

property annotator: Annotator

The organization, person, component, or service which created the textual content of the annotation.

property timestamp: datetime.datetime

The date and time (timestamp) when the annotation was created.

property text: str

The textual content of the annotation.

property bom_ref: cyclonedx.model.bom_ref.BomRef

An optional identifier which can be used to reference the annotation elsewhere in the BOM.