checklist.inc - deleted duplicate BIND 9 checklist icon entry

finding.inc - removed ID property to prevent duplicate findings from being added to the table
host_list.inc - deleted unused constructor
import.inc - formatting
db_schema.json - removed sagacity.findings.id field (making tgt_id and pdi_id new primary keys), and updated references
Database_Baseline.zip - updated routines for above change
background_results.php - fixed bug #19
export-ckl.php - performance adjustments
parse_excel_echecklist.php - performance improvements, ensure duplicate findings are not created, make eChecklist true status, update for removing findings.id field
parse_nvd_json_cve.php - convert reading json to array instead of object for reading CPEs (which were updated to CPE 2.3 instead of 2.2)
parse_* - remove findings.id field
database.inc - formatting, and update for removing findings.id field
index.php - ensure user can't import a host list without uploading a host list file

Fixed:
#65, #51, #28, #27, #10
This commit is contained in:
2018-11-06 15:36:48 -05:00
parent 5d8711d494
commit 21082c7513
17 changed files with 10873 additions and 10973 deletions

View File

@ -104,8 +104,6 @@ class scc_parser extends scan_xml_parser
var $found_rule = false;
var $log = null;
/**
* Constructor
*
@ -665,9 +663,7 @@ class scc_parser extends scan_xml_parser
*/
if (is_array($existing_findings) && count($existing_findings) && isset($existing_findings[$pdi_id])) {
/**
* @var finding $finding
*/
/** @var finding $finding */
$finding = $existing_findings[$pdi_id];
$finding->set_Finding_Status_By_String($finding->get_Deconflicted_Status($group['status']));
@ -679,7 +675,7 @@ class scc_parser extends scan_xml_parser
$update_findings[$pdi_id] = $finding;
} else {
$new_findings[$pdi_id] = new finding(null, $this->tgt->get_ID(), $pdi_id, $this->scan->get_ID(), $group['status'], $note, finding::NC, null, 1);
$new_findings[$pdi_id] = new finding($this->tgt->get_ID(), $pdi_id, $this->scan->get_ID(), $group['status'], $note, finding::NC, null, 1);
}
}
@ -689,11 +685,11 @@ class scc_parser extends scan_xml_parser
$hl->setTargetId($this->tgt->get_ID());
$hl->setTargetName($this->tgt->get_Name());
$hl->setFindingCount(count($new_findings) + count($update_findings));
$hl->setScanError(false);
$this->db->update_Target_Counts($this->tgt->get_ID());
$this->scan->add_Target_to_Host_List($hl);
$this->db->update_Scan_Host_List($this->scan);
}
}