Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vuln.pm: tell "where" #257

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/listvulns.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
print <<HEAD
<tr class=\"tabletop\">
<th title="Vulnerability number">#</th>
<th title="Severity: L=Low, M=Medium, H=High">S</th>
<th title="Severity: L=Low, M=Medium, H=High, C=Critical">S</th>
<th title="Where: Tool-only, Lib-only, default means both">W</th>
<th>Vulnerability</th>
<th title="Date publicly disclosed">Date</th>
<th title="First curl version affected">First</th>
Expand Down Expand Up @@ -52,9 +53,22 @@ sub sev2color {
return "<div style=\"color: $col; border-radius: 8px; border: 2px $col solid; text-align: center;\">$sym</div>";
}

sub where {
my ($tool) = @_;
if($tool eq "tool") {
return "<td title=\"curl tool only\">tool</td>";
}
elsif($tool eq "lib") {
return "<td title=\"libcurl only\">lib</td>";
}

return "<td></td>";
}

my $num = $#vuln + 1;
for(@vuln) {
my ($id, $start, $stop, $desc, $cve, $date, $project, $cwe)=split('\|');
my ($id, $start, $stop, $desc, $cve, $date, $project,
$cwe, $award, $area, $cissue, $tool)=split('\|');
my $year, $mon, $day;

if($date =~ /^(\d\d\d\d)(\d\d)(\d\d)/ ) {
Expand All @@ -68,12 +82,13 @@ sub sev2color {
if($sev) {
$sevcol = "<td title=\"Severity $sev\">$c</td>";
}
my $toolcol = where($tool);

print <<VUL
<tr>
<td>$num</td>
$sevcol
$toolcol
<td><a href="$id">$cve: $desc</a></td>
<td>$year-$mon-$day</td>
<td><a href="vuln-$start.html">$start</a></td>
Expand Down