| 1 | package SSVC::CoordinatorPublication; | ||
| 2 | |||
| 3 | 2 | ▶ | use feature ':5.10'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use parent 'SSVC::Base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | ▶ | use constant PUBLISH => [qw(publish dont_publish)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 2 | ▶ | use constant SUPPLIER_INVOLVEMENT => [qw(fix_ready cooperative uncooperative_unresponsive)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 2 | ▶ | use constant EXPLOITATION => [qw(none public_poc active)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 2 | ▶ | use constant PUBLIC_VALUE_ADDED => [qw(limited ampliative precedence)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 2 | ▶ | use constant METADATA => +{ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | key => 'coordinator_publication', | ||
| 17 | name => 'Coordinator Publication', | ||
| 18 | description => 'Coordinator decision about whether to publish information about a vulnerability.', | ||
| 19 | url => 'https://certcc.github.io/SSVC/', | ||
| 20 | 2 | }; | |
| 21 | |||
| 22 | 2 | ▶ | use constant VECTOR => [qw(SINV E PVA PUBLISH)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | |||
| 24 | 2 | ▶ | use constant DECISION_PATH => [qw(SINV E PVA)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | |||
| 26 | 2 | ▶ | use constant DECISION_TREE => +{ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | # SINV : E : PVA => P | ||
| 29 | |||
| 30 | 'FR:N:L' => 'N', | ||
| 31 | 'C:N:L' => 'N', | ||
| 32 | 'FR:P:L' => 'N', | ||
| 33 | 'FR:N:A' => 'N', | ||
| 34 | 'UU:N:L' => 'N', | ||
| 35 | 'C:P:L' => 'N', | ||
| 36 | 'FR:A:L' => 'N', | ||
| 37 | 'C:N:A' => 'N', | ||
| 38 | 'FR:P:A' => 'N', | ||
| 39 | 'FR:N:P' => 'P', | ||
| 40 | 'UU:P:L' => 'N', | ||
| 41 | 'C:A:L' => 'N', | ||
| 42 | 'UU:N:A' => 'N', | ||
| 43 | 'C:P:A' => 'N', | ||
| 44 | 'FR:A:A' => 'P', | ||
| 45 | 'C:N:P' => 'P', | ||
| 46 | 'FR:P:P' => 'P', | ||
| 47 | 'UU:A:L' => 'P', | ||
| 48 | 'UU:P:A' => 'P', | ||
| 49 | 'C:A:A' => 'P', | ||
| 50 | 'UU:N:P' => 'P', | ||
| 51 | 'C:P:P' => 'P', | ||
| 52 | 'FR:A:P' => 'P', | ||
| 53 | 'UU:A:A' => 'P', | ||
| 54 | 'UU:P:P' => 'P', | ||
| 55 | 'C:A:P' => 'P', | ||
| 56 | 'UU:A:P' => 'P', | ||
| 57 | 2 | }; | |
| 58 | |||
| 59 | #<<< | ||
| 60 | 2 | ▶ | use constant DECISION_POINTS => +{ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 61 | publish => { | ||
| 62 | vector_name => 'PUBLISH', | ||
| 63 | label => 'Publish, Do Not Publish', | ||
| 64 | definition => 'The publish outcome group.', | ||
| 65 | values => [P => 'publish', N => 'dont_publish'], | ||
| 66 | }, | ||
| 67 | |||
| 68 | supplier_involvement => { | ||
| 69 | vector_name => 'SINV', | ||
| 70 | label => 'Supplier Involvement', | ||
| 71 | definition => 'What is the state of the supplier\'s work on addressing the vulnerability?', | ||
| 72 | values => [FR => 'fix_ready', C => 'cooperative', UU => 'uncooperative_unresponsive'], | ||
| 73 | }, | ||
| 74 | |||
| 75 | exploitation => { | ||
| 76 | vector_name => 'E', | ||
| 77 | label => 'Exploitation', | ||
| 78 | definition => 'The present state of exploitation of the vulnerability.', | ||
| 79 | values => [N => 'none', P => 'public_poc', A => 'active'], | ||
| 80 | }, | ||
| 81 | |||
| 82 | public_value_added => { | ||
| 83 | vector_name => 'PVA', | ||
| 84 | label => 'Public Value Added', | ||
| 85 | definition => 'How much value would a publication from the coordinator benefit the broader community?', | ||
| 86 | values => [L => 'limited', A => 'ampliative', P => 'precedence'], | ||
| 87 | }, | ||
| 88 | 2 | }; | |
| 89 | #>>> | ||
| 90 | |||
| 91 | |||
| 92 | 27 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 93 | |||
| 94 | 27 | my ($class, %params) = @_; | |
| 95 | |||
| 96 | 27 | my $self = $class->SUPER::new(%params); | |
| 97 | |||
| 98 | 27 | my $decision = $self->compute; | |
| 99 | |||
| 100 | 27 | $self->{vector}->{PUBLISH} = $decision; | |
| 101 | 27 | $self->{decision} = $class->decision_point_labels('publish')->{$self->vector_value('PUBLISH')}; | |
| 102 | |||
| 103 | 27 | return $self; | |
| 104 | } | ||
| 105 | |||
| 106 | |||
| 107 | 0 | ▶ | sub supplier_involvement { shift->{decision_points}->{supplier_involvement} } |
|
Subroutine
supplier_involvement: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 108 | 0 | ▶ | sub exploitation { shift->{decision_points}->{exploitation} } |
|
Subroutine
exploitation: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 109 | 0 | ▶ | sub public_value_added { shift->{decision_points}->{public_value_added} } |
|
Subroutine
public_value_added: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 110 | 27 | ▶ | sub publish { shift->{decision} } |
|
Subroutine
publish: called CC=1 SCAR=0.0
Pod
documented
| |||
| 111 | |||
| 112 | 0 | ▶ | sub TO_JSON { |
|
Subroutine
TO_JSON: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 113 | |||
| 114 | 0 | my $self = shift; | |
| 115 | |||
| 116 | return { | ||
| 117 | 0 | supplier_involvement => $self->supplier_involvement, | |
| 118 | exploitation => $self->exploitation, | ||
| 119 | public_value_added => $self->public_value_added, | ||
| 120 | publish => $self->publish, | ||
| 121 | }; | ||
| 122 | |||
| 123 | } | ||
| 124 | |||
| 125 | 2 | 1; | |
| 126 | |||
| 127 | |||
| 128 | __END__ | ||