class

CycloneDX::Component

Inherits JSON::Serializable / Reference / Object

Represents a component in the CycloneDX Bill of Materials (BOM). This class is responsible for defining the structure and serialization of a software component, including its type, name, version, and PURL.

Constants

DEFAULT_TYPE = "library"
VALID_SCOPES = ["required", "optional", "excluded"]
VALID_TYPES = ["application", "framework", "library", "container", "platform", "operating-system", "device", "device-driver", "firmware", "file", "machine-learning-model", "data", "cryptographic-asset"]

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

author
Source
authors
Source
bom_ref
Source
component_type
Source
components
Source
crypto_properties
Source
data
Source
description
Source
evidence
Source
external_references
Source
group
Source
hashes
Source
licenses
Source
manufacturer
Source
mime_type
Source
model_card
Source
name
Source
omnibor_id
Source
pedigree
Source
properties
Source
publisher
Source
purl
Source
release_notes
Source
scope
Source
supplier
Source
swhid
Source
swid
Source
tags
Source
to_xml(xml : XML::Builder) : Nil
Source
version

Optional in every CycloneDX version (1.4 onwards). nil means "not known", which is what the schema expresses by omitting the field; it must never be stood in for with a placeholder string like "unknown", since that asserts a version that does not exist and defeats downstream version matching.

Source