@@ -22,6 +22,9 @@ F20_vul_aggregator() {
22
22
module_title " Final vulnerability aggregator"
23
23
24
24
pre_module_reporter " ${FUNCNAME[0]} "
25
+
26
+ # we use this for later decisions:
27
+ export F20_SOURCE=" ${FUNCNAME[0]} "
25
28
print_ln
26
29
27
30
prepare_cve_search_module
@@ -481,7 +484,11 @@ cve_db_lookup_cve() {
481
484
echo " ${CVE_ID} :${CVE_V2:- " NA" } :${CVE_V31:- " NA" } " > " ${LOG_PATH_MODULE} " /" ${CVE_ENTRY} " .txt || true
482
485
fi
483
486
484
- cve_extractor " ${CVE_ENTRY} "
487
+ # only do further analysis if needed
488
+ # in case we come from s26 module we do not need all the upcoming analysis
489
+ if [[ " ${F20_SOURCE} " == " F20_vul_aggregator" ]]; then
490
+ cve_extractor " ${CVE_ENTRY} "
491
+ fi
485
492
}
486
493
487
494
cve_db_lookup_version () {
@@ -493,6 +500,7 @@ cve_db_lookup_version() {
493
500
494
501
# we create something like "binary_1.2.3" for log paths
495
502
local VERSION_PATH=" ${BIN_VERSION_//:/ _} "
503
+ # we test for the binary_name:version and for binary_name:*:
496
504
print_output " [*] CVE database lookup with version information: ${ORANGE}${BIN_VERSION_}${NC} " " no_log"
497
505
498
506
BIN_NAME=$( echo " ${BIN_VERSION_} " | cut -d' :' -f1)
@@ -521,7 +529,11 @@ cve_db_lookup_version() {
521
529
522
530
[[ " ${THREADED} " -eq 1 ]] && wait_for_pid " ${WAIT_PIDS_F19_CVE_SOURCE[@]} "
523
531
524
- cve_extractor " ${BIN_VERSION_} "
532
+ # only do further analysis if needed
533
+ # in case we come from s26 module we do not need all the upcoming analysis
534
+ if [[ " ${F20_SOURCE} " == " F20_vul_aggregator" ]]; then
535
+ cve_extractor " ${BIN_VERSION_} "
536
+ fi
525
537
}
526
538
527
539
# Test the identified JSON files for CPE details and version information
@@ -865,7 +877,7 @@ cve_extractor() {
865
877
if grep -q " ${BINARY} ;.*${VERSION} " " ${S36_LOG} " 2> /dev/null; then
866
878
if [[ " ${VSOURCE} " == " unknown" ]]; then
867
879
VSOURCE=" STAT"
868
- else
880
+ elif ! [[ " ${VSOURCE} " =~ . * STAT. * ]] ; then
869
881
VSOURCE=" ${VSOURCE} " " /STAT"
870
882
fi
871
883
fi
0 commit comments