a => Str);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{name} = $self->name if $self->name;
$json->{url} = $self->url if $self->url;
return $json;
}
1;
=encodin
_JSON {
my $self = shift;
my $json = {};
$json->{statement} = $self->statement if $self->statement;
$json->{signatories} = $self->signatories if @{$self->signatories};
$json
->{signature} = $self->signature if $self->signature;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Declarations::Affirmation - Affirmation
=head1 SYNOPSIS
SBOM::
an
organization to assert validity of this document.
=item C<signature>, Enveloped signature in JSON Signature Format (JSF)
(L<https://cyberphone.github.io/doc/security/jsf.html>).
=item C<statemen
neDX::List->new });
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{score} = $self->score if $self->score;
$json->{rationale} = $s
onale if $self->rationale;
$json->{mitigationStrategies} = $self->mitigation_strategies if @{$self->mitigation_strategies};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBO
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{summary} = $self->summary if $self->summary;
$json->{assessor} = $self->assessor if $self->assessor;
$json->{map}
= $self->map if @{$self->map};
$json->{signature} = $self->signature if $self->signature;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Declarations::Attest
ttestors
declared conformance and confidence thereof.
=item C<signature>, Enveloped signature in JSON Signature Format (JSF)
(L<https://cyberphone.github.io/doc/security/jsf.html>).
=item C<summary>
loneDX::List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{organizations} = $self->organizations if @{$self->organizations};
$json->{components} = $self->comp
onents if @{$self->components};
$json->{services} = $self->services if @{$self->services};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Declarations::Targ
', isa => HashRef);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{target} = $
$json->{predicate} = $self->predicate if $self->predicate;
$json->{mitigationStrategies} = $self->mitigation_strategies if @{$self->mitigation_strategies};
$json->{r
$json->{evidence} = $self->evidence if @{$self->evidence};
$json->{counterEvidence} = $self->counter_evidence if @{$self->counter_evidence};
$json->{ext
::Timestamp->new($_[0]) }
);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{state} = $self->state if $self->state;
$json->{justification} = $self->justifica
if $self->response;
$json->{detail} = $self->detail if $self->detail;
$json->{firstIssued} = $self->first_issued if $self->first_issued;
$json->{lastUpdated} = $self->
last_updated if $self->last_updated;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Vulnerability::Analysis - Impact Analysis
=head1 SYNOPSIS
SBOM::CycloneDX::Vulnera
::ExternalReference']);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{name} = $self->name if $self->name;
$json->{role} = $self->r
self->role;
$json->{signature} = $self->signature if $self->signature;
$json->{organization} = $self->organization if $self->organization;
$json->{externalRefer
ence} = $self->external_reference if $self->external_reference;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Declarations::Signatory - Signatory
=head1 SYNOPSIS
SBOM
JSON {
my $self = shift;
my $json = {};
$json->{name} = $self->name if $self->name;
$json->{contents} = $self->contents if $self->contents;
$json
sification;
$json->{sensitiveData} = $self->sensitive_data if @{$self->sensitive_data};
$json->{governance} = $self->governance if $self->governance;
return $json;
}
1;
=encod
:Attachment']]);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{reproductionSteps} = $self->reproduction_steps if $self->reproduction_steps;
$json->{environment} =
nvironment if $self->environment;
$json->{supportingMaterial} = $self->supporting_material if @{$self->supporting_material};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::
X::List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {ref => $self->ref};
$json->{versions} = $self->versions if @{$self->versions};
return $json;
}
1;
=encoding utf-8
M::CycloneDX::Service']);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{organization} = $self->organization if $self->organization;
$json->{individual} = $self->individu
nt} = $self->component if $self->component;
$json->{service} = $self->service if $self->service;
my @check = keys %{$json};
if (scalar @check != 1) {
Carp::croak
on", "individual", "component" and "service" cannot be used at the same time';
}
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Annotation::Annotator - Annotator
=head1
oneDX::List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{identifier} = $self
lf->identifier;
$json->{title} = $self->title if $self->title;
$json->{text} = $self->text if $self->text;
$json->{descriptions}
escriptions;
$json->{openCre} = $self->open_cre if $self->open_cre;
$json->{parent} = $self->parent if $self->parent;
$json->{properties}
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{phase} = $self->phase if $self->phase;
$json->{name} = $self->name if $self->name;
$json->{desc
ription} = $self->description if $self->description;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Metadata::Lifecycle - Lifecycle
=head1 SYNOPSIS
SBOM::CycloneDX::Me
O_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{identifier} = $self->identifier if $self->identifier;
$json-
f $self->title;
$json->{description} = $self->description if $self->description;
$json->{requirements} = $self->requirements if @{$self->requirements};
return $json;
}
1;
=encoding u
lnerability::Source'], required => 1);
sub TO_JSON {
my $self = shift;
my $json = {id => $self->id, source => $self->source};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::
loneDX::List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{organizations} = $self->organizations if @{$self->organizations};
$json->{individuals} = $self->indi
viduals if @{$self->individuals};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Vulnerability::Credits - Credits
=head1 SYNOPSIS
SBOM::CycloneDX::Vulnerability::Cre
a => Str);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{name} = $self->name if $self->name;
$json->{url} = $self->url if $self->url;
return $json;
}
1;
=encodin
TO_JSON {
my $self = shift;
my $json = {};
$json->{source} = $self->source if $self->source;
$json->{score} = $self->score if $self->score;
$json->
if $self->severity;
$json->{method} = $self->method if $self->method;
$json->{vector} = $self->vector if $self->vector;
$json->{justification} = $self->jus
tification if $self->justification;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Vulnerability::Rating - Rating
=head1 SYNOPSIS
SBOM::CycloneDX::Vulnerability::Ratin
:JSON::XS qw(decode_json);
state @LICENSES;
unless (@LICENSES) {
my $spdx_json_schema_file = SBOM::CycloneDX::Schema::schema_file('spdx.schema.json');
my $spdx_json_schema = decode_json
(SBOM::CycloneDX::Util::file_read($spdx_json_schema_file));
@LICENSES = @{$spdx_json_schema->{enum}};
}
use constant SPDX_LICENSES => \@LICENSES;
use constant COMPONENT_TYPES => (qw[
applica