CycloneDX/Vulnerability/ProofOfConcept.pm

filter: Statementstmt 80.0% 28 / 35 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 1 / 1 totaltotal 72.5% 37 / 51 CC 4 SCAR 19.9
CC
4
Cov
68%
TO_JSON
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.3
« CycloneDX/Metadata.pm ↑ Summary CycloneDX/Declarations/Assessor.pm »
1 package SBOM::CycloneDX::Vulnerability::ProofOfConcept;
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);
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 reproduction_steps => (is => 'rw', isa => Str);
17 1 has environment => (is => 'rw', isa => Str);
18  
19 1 has supporting_material => (is => 'rw', isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Attachment']]);
20  
21 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=4 SCAR=30.0
Pod documented
22  
23 0 my $self = shift;
24  
25 0 my $json = {};
26  
27 0 ▶ $json->{reproductionSteps} = $self->reproduction_steps if $self->reproduction_steps;
Branch: 1 branch
BranchTrueFalseTotal
if $self->reproduction_steps 0 0 0
28 0 ▶ $json->{environment} = $self->environment if $self->environment;
Branch: 1 branch
BranchTrueFalseTotal
if $self->environment 0 0 0
29 0 ▶ $json->{supportingMaterial} = $self->supporting_material if @{$self->supporting_material};
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->supporting_material;} 0 0 0
30  
31 0 return $json;
32  
33 }
34  
35 1 1;
36  
37 =encoding utf-8
38  
39 =head1 NAME
40  
41 SBOM::CycloneDX::Vulnerability::ProofOfConcept - Proof of Concept
42  
43 =head1 SYNOPSIS
44  
45 SBOM::CycloneDX::Vulnerability::ProofOfConcept->new();
46  
47  
48 =head1 DESCRIPTION
49  
50 L<SBOM::CycloneDX::Vulnerability::ProofOfConcept> Evidence used to
51 reproduce the vulnerability.
52  
53 =head2 METHODS
54  
55 L<SBOM::CycloneDX::Vulnerability::ProofOfConcept> inherits all methods from L<SBOM::CycloneDX::Base>
56 and implements the following new ones.
57  
58 =over
59  
60 =item SBOM::CycloneDX::Vulnerability::ProofOfConcept->new( %PARAMS )
61  
62 Properties:
63  
64 =over
65  
66 =item * C<environment>, A description of the environment in which
67 reproduction was possible.
68  
69 =item * C<reproduction_steps>, Precise steps to reproduce the vulnerability.
70  
71 =item * C<supporting_material>, Supporting material that helps in reproducing
72 or understanding how reproduction is possible. This may include
73 screenshots, payloads, and PoC exploit code.
74  
75 =back
76  
77 =item $proof_of_concept->environment
78  
79 =item $proof_of_concept->reproduction_steps
80  
81 =item $proof_of_concept->supporting_material
82  
83 =back
84  
85  
86 =head1 SUPPORT
87  
88 =head2 Bugs / Feature Requests
89  
90 Please report any bugs or feature requests through the issue tracker
91 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
92 You will be notified automatically of any progress on your issue.
93  
94 =head2 Source Code
95  
96 This is open source software. The code repository is available for
97 public review and contribution under the terms of the license.
98  
99 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
100  
101 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
102  
103  
104 =head1 AUTHOR
105  
106 =over 4
107  
108 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
109  
110 =back
111  
112  
113 =head1 LICENSE AND COPYRIGHT
114  
115 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
116  
117 This is free software; you can redistribute it and/or modify it under
118 the same terms as the Perl 5 programming language system itself.
119  
120 =cut
« CycloneDX/Metadata.pm ↑ Summary CycloneDX/Declarations/Assessor.pm »