bug(software): Bug fix with software detection

Ubuntu.png - Add new Ubuntu checklist icon
Database_Baseline.zip - Update software detection tables
checklist.inc - Fix software icon detection for IE and SLES, and added detection for Ubuntu
software.inc - Fix bug adding extra spaces to software strings
parse_stig.php - Formatting and add save for when icon is updated
parse_stig_viewer.php - Add scan note when CKL file is missing or has empty <HOST_NAME> tag

Fix #87
This commit is contained in:
Ryan Prather 2019-01-17 12:20:18 -05:00
parent 87991666fd
commit 55f086e8af
No known key found for this signature in database
GPG Key ID: 66FDE2B4E8AB87A7
6 changed files with 498 additions and 467 deletions

Binary file not shown.

View File

@ -5,7 +5,7 @@
* Purpose: Represents a checklist that links a PDI and software package
* Created: Sep 12, 2013
*
* Portions Copyright 2017: Cyber Perspectives, All rights reserved
* Portions Copyright 2017-2019: CyberPerspectives, LLC, All rights reserved
* Released under the Apache v2.0 License
*
* Portions Copyright (c) 2012-2015, Salient Federal Solutions
@ -406,7 +406,7 @@ class checklist
case (preg_match("/Dot Net|DotNet/i", $this->name) ? true : false):
$this->icon = 'Microsoft .NET.png';
break;
case (preg_match("/Internet Explorer/i", $this->name) ? true : false):
case (preg_match("/Internet Explorer|Microsoft IE/i", $this->name) ? true : false):
$this->icon = 'Internet Explorer.png';
break;
case (preg_match("/Windows Phone/i", $this->name) ? true : false):
@ -452,7 +452,7 @@ class checklist
case (preg_match("/Red ?Hat/i", $this->name) ? true : false):
$this->icon = 'RedHat Linux.jpg';
break;
case (preg_match("/SUSE Linux/i", $this->name) ? true : false):
case (preg_match("/SUSE Linux|SLES/i", $this->name) ? true : false):
$this->icon = 'SUSE Linux.png';
break;
case (preg_match("/Solaris/i", $this->name) ? true : false):
@ -461,6 +461,9 @@ class checklist
case (preg_match("/Storage Area/i", $this->name) ? true : false):
$this->icon = 'Storage Area Network.gif';
break;
case (preg_match("/Ubuntu/i", $this->name) ? true : false):
$this->icon = 'Ubuntu.png';
break;
case (preg_match("/z\/OS/i", $this->name) ? true : false):
$this->icon = 'ZOS.jpg';
break;

View File

@ -595,7 +595,7 @@ class software {
if ($regex2['name_match']) {
foreach (explode(",", $regex2['name_match']) as $idx) {
if (isset($match[$idx])) {
if (isset($match[$idx]) && $match[$idx]) {
$sw['name'] .= " " . $match[$idx];
}
}
@ -603,7 +603,7 @@ class software {
if ($regex2['ver_match']) {
foreach (explode(",", $regex2['ver_match']) as $idx) {
if (isset($match[$idx])) {
if (isset($match[$idx]) && $match[$idx]) {
$sw['ver'] .= $match[$idx] . " ";
}
}

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
* Purpose: Read STIG Viewer checklist files
* Created: Apr 10, 2014
*
* Portions Copyright 2016-2017: Cyber Perspectives, LLC, All rights reserved
* Portions Copyright 2016-2019: CyberPerspectives, LLC, All rights reserved
* Released under the Apache v2.0 License
*
* Portions Copyright (c) 2012-2015, Salient Federal Solutions
@ -74,6 +74,7 @@ $host_mac = getValue($xml, '//HOST_MAC');
if (!$host_name) {
$db->update_Running_Scan($base_name, ['name' => 'status', 'value' => 'TERMINATED']);
$db->update_Running_Scan($base_name, ['name' => 'notes', 'value' => 'File parsing was terminated because <HOST_NAME> was empty or absent']);
unset($xml);
rename($cmd['f'], TMP . "/terminated/{$base_name}");

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB