Merge branch 'ent-11125-pandora-security-monitoring-vulnerability-scanner' into ent-11126-vulnerability-scanner-interface

This commit is contained in:
Daniel Cebrian 2023-11-08 08:36:05 +01:00
commit faf8cde5e1
2 changed files with 7 additions and 3 deletions

View File

@ -7942,7 +7942,7 @@ sub process_inventory_data ($$$$$$$) {
################################################################################
# Process inventory module data, creating the module if necessary.
################################################################################
sub process_inventory_module_data ($$$$$$$$) {
sub process_inventory_module_data {
my ($pa_config, $data, $server_id, $agent_name,
$module_name, $interval, $timestamp, $dbh) = @_;
@ -8013,7 +8013,7 @@ sub process_inventory_module_data ($$$$$$$$) {
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]);
my $vulnerability_data = enterprise_hook('process_inventory_vulnerabilities', [$pa_config, $data, $agent, $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);
}

View File

@ -655,7 +655,11 @@ sub get_recon_macro_value($$$$) {
}
# Name of the group if it exists. Empty otherwise.
elsif ($type eq 'agent_groups') {
my $group_name = get_group_name($dbh, $value);
my $group_name = '';
if ($value > 0) {
$group_name = get_group_name($dbh, $value);
}
if (defined($group_name)) {
$ret = $group_name;
}