Skip to content

Commit

Permalink
get the meta correctly in assemble_advisory
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Dec 30, 2024
1 parent 8853c9e commit b506d4e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Local/CPANSA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ sub assemble_advisory ( $config ) {
$hash{cves} = [];
push $hash{cves}->@*, $config->cve if $config->cve;

my $serial = $hash{cves} =~ s/\ACVE-//r;
my $serial = $hash{cves}[0] =~ s/\ACVE-//r;
$serial //= sprintf '%s-%s', (localtime)[5] + 1900, '001';
my $url = "$base$hash{cves}";
my $url = "$base$hash{cves}[0]";

$hash{description} = undef;
$hash{references} = [];
Expand Down Expand Up @@ -58,7 +58,9 @@ sub assemble_advisory ( $config ) {
# my $package = guess_package( $item );
# $package =~ s/::/-/g;

$hash{id} = sprintf 'CPANSA-%s-%s', $config->distribution, $serial;
my $meta = Local::Config::make_record->new_meta($config);

$hash{id} = sprintf 'CPANSA-%s-%s', $meta->{distribution}, $serial;

$hash{embedded_vulnerability} = { name => undef, distributed_version => undef };

Expand Down

0 comments on commit b506d4e

Please sign in to comment.