diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index e7ac485a1d..335f826b00 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -7502,12 +7502,16 @@ sub process_inventory_module_data ($$$$$$$$) { 'INSERT INTO tagente_datos_inventory (id_agent_module_inventory, data, timestamp, utimestamp) VALUES (?, ?, ?, ?)', $id_agent_module_inventory, safe_input($data), $timestamp, $utimestamp); - - return; + } else { + process_inventory_module_diff($pa_config, safe_input($data), + $inventory_module, $timestamp, $utimestamp, $dbh, $interval); + } + + # 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); } - - process_inventory_module_diff($pa_config, safe_input($data), - $inventory_module, $timestamp, $utimestamp, $dbh, $interval); } ################################################################################