| 1 | package SBOM::CycloneDX::Declarations::Attestation; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use Types::Standard qw(Str InstanceOf HashRef); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Types::TypeTiny qw(ArrayLike); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 1 | extends 'SBOM::CycloneDX::Base'; | |||||||||
| 15 | |||||||||||
| 16 | 1 | has summary => (is => 'rw', isa => Str); | |||||||||
| 17 | 1 | has assessor => (is => 'rw', isa => Str); # Like bom-ref | |||||||||
| 18 | 1 | has map => (is => 'rw', isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Declarations::Map']]); | |||||||||
| 19 | 1 | has signature => (is => 'rw', isa => HashRef); | |||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub TO_JSON { | ||||||||
|
Subroutine
TO_JSON: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||
| 22 | |||||||||||
| 23 | 0 | my $self = shift; | |||||||||
| 24 | |||||||||||
| 25 | 0 | my $json = {}; | |||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | $json->{summary} = $self->summary if $self->summary; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 0 | ▶ | $json->{assessor} = $self->assessor if $self->assessor; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | ▶ | $json->{map} = $self->map if @{$self->map}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | ▶ | $json->{signature} = $self->signature if $self->signature; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | 0 | return $json; | |||||||||
| 33 | |||||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | 1; | |||||||||
| 37 | |||||||||||
| 38 | =encoding utf-8 | ||||||||||
| 39 | |||||||||||
| 40 | =head1 NAME | ||||||||||
| 41 | |||||||||||
| 42 | SBOM::CycloneDX::Declarations::Attestation - Attestation | ||||||||||
| 43 | |||||||||||
| 44 | =head1 SYNOPSIS | ||||||||||
| 45 | |||||||||||
| 46 | SBOM::CycloneDX::Declarations::Attestation->new(); | ||||||||||
| 47 | |||||||||||
| 48 | |||||||||||
| 49 | =head1 DESCRIPTION | ||||||||||
| 50 | |||||||||||
| 51 | L<SBOM::CycloneDX::Declarations::Attestation> provides the attestation asserted | ||||||||||
| 52 | by an assessor that maps requirements to claims. | ||||||||||
| 53 | |||||||||||
| 54 | =head2 METHODS | ||||||||||
| 55 | |||||||||||
| 56 | L<SBOM::CycloneDX::Declarations::Attestation> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 57 | and implements the following new ones. | ||||||||||
| 58 | |||||||||||
| 59 | =over | ||||||||||
| 60 | |||||||||||
| 61 | =item SBOM::CycloneDX::Declarations::Attestation->new( %PARAMS ) | ||||||||||
| 62 | |||||||||||
| 63 | Properties: | ||||||||||
| 64 | |||||||||||
| 65 | =over | ||||||||||
| 66 | |||||||||||
| 67 | =item * C<assessor>, The `bom-ref` to the assessor asserting the attestation. | ||||||||||
| 68 | |||||||||||
| 69 | =item * C<map>, The grouping of requirements to claims and the attestors | ||||||||||
| 70 | declared conformance and confidence thereof. | ||||||||||
| 71 | |||||||||||
| 72 | =item * C<signature>, Enveloped signature in JSON Signature Format (JSF) | ||||||||||
| 73 | (L<https://cyberphone.github.io/doc/security/jsf.html>). | ||||||||||
| 74 | |||||||||||
| 75 | =item * C<summary>, The short description explaining the main points of the | ||||||||||
| 76 | attestation. | ||||||||||
| 77 | |||||||||||
| 78 | =back | ||||||||||
| 79 | |||||||||||
| 80 | =item $attestation->assessor | ||||||||||
| 81 | |||||||||||
| 82 | =item $attestation->map | ||||||||||
| 83 | |||||||||||
| 84 | =item $attestation->signature | ||||||||||
| 85 | |||||||||||
| 86 | =item $attestation->summary | ||||||||||
| 87 | |||||||||||
| 88 | =back | ||||||||||
| 89 | |||||||||||
| 90 | |||||||||||
| 91 | =head1 SUPPORT | ||||||||||
| 92 | |||||||||||
| 93 | =head2 Bugs / Feature Requests | ||||||||||
| 94 | |||||||||||
| 95 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 96 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 97 | You will be notified automatically of any progress on your issue. | ||||||||||
| 98 | |||||||||||
| 99 | =head2 Source Code | ||||||||||
| 100 | |||||||||||
| 101 | This is open source software. The code repository is available for | ||||||||||
| 102 | public review and contribution under the terms of the license. | ||||||||||
| 103 | |||||||||||
| 104 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 105 | |||||||||||
| 106 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 107 | |||||||||||
| 108 | |||||||||||
| 109 | =head1 AUTHOR | ||||||||||
| 110 | |||||||||||
| 111 | =over 4 | ||||||||||
| 112 | |||||||||||
| 113 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 114 | |||||||||||
| 115 | =back | ||||||||||
| 116 | |||||||||||
| 117 | |||||||||||
| 118 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 119 | |||||||||||
| 120 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 121 | |||||||||||
| 122 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 123 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 124 | |||||||||||
| 125 | =cut | ||||||||||