>new });
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{encr} = $self->encr if @{$self->encr};
$json->{prf} = $self->prf if @{$self->prf};
$json->{integ} = $self
f->integ};
$json->{ke} = $self->ke if @{$self->ke};
$json->{esn} = $self->esn if @{$self->esn};
$json->{auth} = $self->auth if @{$self->auth};
return $json;
}
1;
=encod
']]);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{type} = $self->type if $self->type;
$json->{diff} = $self->diff if $self->diff;
$json->{resolves} =
$self->resolves if @{$self->resolves};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Component::Patch - Patch
=head1 SYNOPSIS
SBOM::CycloneDX::Component::Patch->new(
', isa => Str);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{subjectName} = $self->subject_name if $self->subject_name;
$json->{issuerName}
$json->{notValidBefore} = $self->not_valid_before if $self->not_valid_before;
$json->{notValidAfter} = $self->not_valid_after if $self->not_valid_after;
$json->
hm_ref if $self->signature_algorithm_ref;
$json->{subjectPublicKeyRef} = $self->subject_public_key_ref if $self->subject_public_key_ref;
$json->{certificateFormat} = $self->certificate_
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
', 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
TO_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{components} = $self->components if @{$self->components};
$json->{s
@{$self->services};
$json->{workflows} = $self->workflows if @{$self->workflows};
$json->{properties} = $self->properties if @{$self->properties};
return $json;
}
1;
=encoding utf-8
List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {url => $self->url, type => $self->type};
$json->{comment} = $self->comment if $self->comment;
$json->{hashes} = $self->h
ashes if @{$self->hashes};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::ExternalReference - External Reference
=head1 SYNOPSIS
SBOM::CycloneDX::ExternalReference->n
_JSON {
my $self = shift;
my $json = {};
$json->{timestamp} = $self->timestamp if $self->timestamp;
$json->{lifecycles} = $self->lifecycles if @{$self->lifecycles};
$json-
if @{$self->tools};
$json->{authors} = $self->authors if @{$self->authors};
$json->{component} = $self->component if $self->component;
$json->{manufacture} = $self->manuf
re if $self->manufacture;
$json->{supplier} = $self->supplier if $self->supplier;
$json->{licenses} = $self->licenses if @{$self->licenses};
$json->{properties} = $self->prope
CycloneDX::List->new }
);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{id} = $self->id
$self->source;
$json->{references} = $self->references if @{$self->references};
$json->{ratings} = $self->ratings if @{$self->ratings};
$json->{cwes} =
if @{$self->cwes};
$json->{description} = $self->description if $self->description;
$json->{detail} = $self->detail if $self->detail;
$json->{recommendation} = $s
O_JSON {
my $self = shift;
my $json = {};
$json->{custodians} = $self->custodians if @{$self->custodians};
$json->{stewards} = $self->stewards if @{$self->stewards};
$json->
{owners} = $self->owners if @{$self->owners};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::DataGovernance - Data Governance
=head1 SYNOPSIS
SBOM::CycloneDX::
s->$orig(@args);
};
has value => (is => 'rw', required => 1);
sub to_string { shift->TO_JSON }
sub TO_JSON { shift->value }
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::BomRef - BOM-ref rep
eDX::BomRef->new( %PARAMS )
=item $bom_ref->value
=item $bom_ref->to_string
=item $bom_ref->TO_JSON
Return BOM ref.
=back
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs o
=> (is => 'rw', isa => Str);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{assetType} = $self->asset_type if $self->asset_type;
$json->{algorithmProperties} = $self->al
%{$self->algorithm_properties->TO_JSON};
$json->{certificateProperties} = $self->certificate_properties if %{$self->certificate_properties->TO_JSON};
$json->{relatedCryptoMaterialProperties}
operties->TO_JSON};
$json->{protocolProperties} = $self->protocol_properties if %{$self->protocol_properties->TO_JSON};
$json->{oid} = $self->oid if $self->oid;
return $json;
}
1;
=e
;
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{timestamp} = $self->timestamp if $self->timestamp;
$json->{name} = $self->name if $self->name;
$json->{email}
= $self->email if $self->email;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::IdentifiableAction - Identifiable Action
=head1 SYNOPSIS
SBOM::CycloneDX::Ident
nt'], required => 1);
sub TO_JSON {
my $self = shift;
my $json = {text => $self->text};
$json->{locale} = $self->locale if $self->locale;
return $json;
}
1;
=encoding utf-8
=h
> ArrayLike [HashRef], default => sub { SBOM::CycloneDX::List->new });
sub TO_JSON {
my $self = shift;
my $json = {
subjects => $self->subjects,
annotator => $self->annotat
=> $self->text
};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{signature} = $self->signature if $self->signature;
return $json;
}
1;
=encoding utf-8
=hea
k intro 'urn:cdx:' to avoid
conflicts with BOM-Links.
=item C<signature>, Enveloped signature in JSON Signature Format (JSF)
(L<https://cyberphone.github.io/doc/security/jsf.html>).
=item C<subjects
]->alg} != length($_[0]->content);
}
sub TO_JSON {
my $self = shift;
my $json = {alg => $self->alg, content => $self->content};
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM
sub TO_JSON {
my $self = shift;
my $json = {type => $self->type, name => $self->name};
$json->{'mime-type'} = $self->mime_type if $self->mime_type;
$json->{'bom-
>bom_ref;
$json->{supplier} = $self->supplier if $self->supplier;
$json->{manufacturer} = $self->manufacturer if $self->manufacturer;
$json->{authors}
f->authors};
$json->{author} = $self->author if $self->author;
$json->{publisher} = $self->publisher if $self->publisher;
$json->{group}
tr);
sub TO_JSON {
my $self = shift;
my $json = {};
$json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
$json->{name} = $self->name if $self->name;
$json->{email}
= $self->email if $self->email;
$json->{phone} = $self->phone if $self->phone;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::OrganizationalContact - Organizat
ile);
use JSON::Validator;
use Types::Standard qw(HashRef InstanceOf);
use Moo;
use constant DEBUG => $ENV{SBOM_DEBUG} || 0;
our @JSON_SCHEMA_REGISTRY = (
'bom-1.2-strict.schema.json', 'bom-1.
-1.3-strict.schema.json', 'bom-1.3.schema.json',
'bom-1.4.schema.json', 'bom-1.5.schema.json', 'bom-1.6.schema.json', 'jsf-0.82.schema.json',
'spdx.schema.json',
);
has bom => (
elf) = @_;
my $jv = JSON::Validator->new;
foreach my $json_schema_file (@JSON_SCHEMA_REGISTRY) {
DEBUG and say sprintf('-- Preload JSON Schema file %s', $json_schema_file);
$
TO_JSON {
my $self = shift;
my $json = {};
$json->{versions} = $self->versions if $self->versions;
$json->{range} = $self->range->to_string if $self->range;
$json->{
status} = $self->status if $self->status;
return $json;
}
1;
=encoding utf-8
=head1 NAME
SBOM::CycloneDX::Version - Version
=head1 SYNOPSIS
SBOM::CycloneDX::Version->new();