File Coverage

blib/lib/SBOM/CycloneDX/Vulnerability/ProofOfConcept.pm
Criterion Covered Total %
statement 23 30 76.6
branch 0 6 0.0
condition n/a
subroutine 8 9 88.8
pod 1 1 100.0
total 32 46 69.5


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::Vulnerability::ProofOfConcept;
2              
3 1     1   1563 use 5.010001;
  1         4  
4 1     1   6 use strict;
  1         3  
  1         31  
5 1     1   5 use warnings;
  1         2  
  1         60  
6 1     1   6 use utf8;
  1         2  
  1         7  
7              
8 1     1   43 use Types::Standard qw(Str InstanceOf);
  1         3  
  1         8  
9 1     1   3523 use Types::TypeTiny qw(ArrayLike);
  1         3  
  1         7  
10              
11 1     1   562 use Moo;
  1         3  
  1         8  
12 1     1   547 use namespace::autoclean;
  1         3  
  1         11  
13              
14             extends 'SBOM::CycloneDX::Base';
15              
16             has reproduction_steps => (is => 'rw', isa => Str);
17             has environment => (is => 'rw', isa => Str);
18              
19             has supporting_material => (is => 'rw', isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Attachment']]);
20              
21             sub TO_JSON {
22              
23 0     0 1   my $self = shift;
24              
25 0           my $json = {};
26              
27 0 0         $json->{reproductionSteps} = $self->reproduction_steps if $self->reproduction_steps;
28 0 0         $json->{environment} = $self->environment if $self->environment;
29 0 0         $json->{supportingMaterial} = $self->supporting_material if @{$self->supporting_material};
  0            
30              
31 0           return $json;
32              
33             }
34              
35             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 Evidence used to
51             reproduce the vulnerability.
52              
53             =head2 METHODS
54              
55             L inherits all methods from L
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, A description of the environment in which
67             reproduction was possible.
68              
69             =item * C, Precise steps to reproduce the vulnerability.
70              
71             =item * C, 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.
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
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
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