Skip to content

Commit

Permalink
Add message about unfixed vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkowicz committed Feb 14, 2021
1 parent 7a3ca05 commit 5253525
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/Writer/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ public function writeResult($plugin, $result) {
$j = 1;
foreach ($result as $key => $vuln) {
$this->output .= '<div class="row"><div class="col-md-10">';
$this->output .= '<h4>' . $vuln["title"] . ' <span class="label label-default">' . $vuln["id"] .
'</span> <span class="label label-danger">' . $vuln["vuln_type"] . '</span></h4>';
$this->output .= "<p>Fixed in Version " . $vuln["fixed_in"]. "</p>";
$this->output .= "<p><h5>References;</h5>";

$this->output .= '<h4>' . $vuln["title"] . ' <span class="label label-default">' . $vuln["id"] .
'</span> <span class="label label-danger">' . $vuln["vuln_type"] . '</span></h4>';
if ($vuln["fixed_in"]) {
$this->output .= "<p>Fixed in Version " . $vuln["fixed_in"] . "</p>";
} else {
$this->output .= '<p class="text-danger">No known fix</p>';
}
$this->output .= "<p><h5>References;</h5>";

foreach ($vuln["references"] as $key1 => $values) {
foreach ($values as $key2 => $value) {
if ($key1 == 'url') {
Expand Down
8 changes: 5 additions & 3 deletions src/Writer/Readable.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ public function writeResult($plugin, $result) {
$this->writeLine(
"\t" . $j . ") id: " . $vuln["id"] . ", " . $vuln["title"]
);
$this->writeLine(
"\t" . "Fixed in Version " . $vuln["fixed_in"]
);
if ($vuln["fixed_in"]) {
$this->writeLine("\t" . "Fixed in Version " . $vuln["fixed_in"]);
} else {
$this->writeLine("\t" . "No known fix");
}

$references = [];
foreach ($vuln["references"] as $key1 => $values) {
Expand Down

0 comments on commit 5253525

Please sign in to comment.