Add configuration options for vulnerability scans.
This commit is contained in:
parent
23a55a9f66
commit
1fbba70eb1
|
@ -206,6 +206,9 @@ sub pandora_get_sharedconfig ($$) {
|
|||
|
||||
# Server identifier
|
||||
$pa_config->{'server_unique_identifier'} = pandora_get_tconfig_token ($dbh, 'server_unique_identifier', '');
|
||||
|
||||
# Vulnerability scans
|
||||
$pa_config->{'agent_vulnerabilities'} = pandora_get_tconfig_token ($dbh, 'agent_vulnerabilities', 0);
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
|
|
@ -8010,9 +8010,13 @@ sub process_inventory_module_data ($$$$$$$$) {
|
|||
}
|
||||
|
||||
# Vulnerability scan.
|
||||
my $vulnerability_data = enterprise_hook('process_inventory_vulnerabilities', [$pa_config, $agent->{'os_version'}, $data, $inventory_module, $dbh]);
|
||||
if (defined($vulnerability_data) && $vulnerability_data ne '') {
|
||||
process_inventory_module_data ($pa_config, $vulnerability_data, $server_id, $agent_name, 'Vulnerabilities', $interval, $timestamp, $dbh);
|
||||
if (($pa_config->{'agent_vulnerabilities'} == 0 && $agent->{'vul_scan_enabled'} == 1) ||
|
||||
($pa_config->{'agent_vulnerabilities'} == 1 && $agent->{'vul_scan_enabled'} == 1) ||
|
||||
($pa_config->{'agent_vulnerabilities'} == 1 && $agent->{'vul_scan_enabled'} == 2)) {
|
||||
my $vulnerability_data = enterprise_hook('process_inventory_vulnerabilities', [$pa_config, $agent->{'os_version'}, $data, $inventory_module, $dbh]);
|
||||
if (defined($vulnerability_data) && $vulnerability_data ne '') {
|
||||
process_inventory_module_data ($pa_config, $vulnerability_data, $server_id, $agent_name, 'Vulnerabilities', $interval, $timestamp, $dbh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue