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 : JSON::PullParser)
Sourcenew(name : String, version : String | Nil = nil, component_type : String = DEFAULT_TYPE, purl : String | Nil = nil, description : String | Nil = nil, author : String | Nil = nil, licenses : Array(License | LicenseExpression) | Nil = nil, external_references : Array(ExternalReference) | Nil = nil, bom_ref : String | Nil = nil, scope : String | Nil = nil, hashes : Array(Hash) | Nil = nil, properties : Array(Property) | Nil = nil, group : String | Nil = nil, copyright : String | Nil = nil, cpe : String | Nil = nil, supplier : OrganizationalEntity | Nil = nil, manufacturer : OrganizationalEntity | Nil = nil, publisher : String | Nil = nil, mime_type : String | Nil = nil, components : Array(Component) | Nil = nil, tags : Array(String) | Nil = nil, omnibor_id : Array(String) | Nil = nil, swhid : Array(String) | Nil = nil, pedigree : Pedigree | Nil = nil, evidence : Evidence | Nil = nil, authors : Array(OrganizationalContact) | Nil = nil, swid : Swid | Nil = nil, release_notes : ReleaseNotes | Nil = nil, model_card : ModelCard | Nil = nil, data : Array(ComponentData) | Nil = nil, crypto_properties : CryptoProperties | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
author
Sourceauthors
Sourcebom_ref
Sourcecomponent_type
Sourcecomponents
Sourcecopyright
Sourcecpe
Sourcecrypto_properties
Sourcedata
Sourcedescription
Sourceevidence
Sourceexternal_references
Sourcegroup
Sourcehashes
Sourcelicenses
Sourcemanufacturer
Sourcemime_type
Sourcemodel_card
Sourcename
Sourceomnibor_id
Sourcepedigree
Sourceproperties
Sourcepublisher
Sourcepurl
Sourcerelease_notes
Sourcescope
Sourcesupplier
Sourceswhid
Sourceswid
Sourcetags
Sourceversion
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.