@@ -509,10 +509,9 @@ def process_matched_mitigated_finding(
509
509
if existing_finding .get_sla_configuration ().restart_sla_on_reactivation :
510
510
# restart the sla start date to the current date, finding.save() will set new sla_expiration_date
511
511
existing_finding .sla_start_date = self .now
512
-
513
- existing_finding .save (dedupe_option = False )
514
- # don't dedupe before endpoints are added
515
- existing_finding .save (dedupe_option = False )
512
+ existing_finding = self .process_cve (existing_finding )
513
+ # don't dedupe before endpoints are added, postprocessing will be done on next save (in calling method)
514
+ existing_finding .save_no_options ()
516
515
note = Notes (entry = f"Re-activated by { self .scan_type } re-upload." , author = self .user )
517
516
note .save ()
518
517
endpoint_statuses = existing_finding .status_finding .exclude (
@@ -560,6 +559,7 @@ def process_matched_active_finding(
560
559
existing_finding .active = False
561
560
if self .verified is not None :
562
561
existing_finding .verified = self .verified
562
+ existing_finding = self .process_cve (existing_finding )
563
563
existing_finding .save_no_options ()
564
564
565
565
elif unsaved_finding .risk_accepted or unsaved_finding .false_p or unsaved_finding .out_of_scope :
@@ -574,6 +574,7 @@ def process_matched_active_finding(
574
574
existing_finding .active = False
575
575
if self .verified is not None :
576
576
existing_finding .verified = self .verified
577
+ existing_finding = self .process_cve (existing_finding )
577
578
existing_finding .save_no_options ()
578
579
else :
579
580
# if finding is the same but list of affected was changed, finding is marked as unchanged. This is a known issue
@@ -609,8 +610,8 @@ def process_finding_that_was_not_matched(
609
610
# scan_date was provided, override value from parser
610
611
if self .scan_date_override :
611
612
unsaved_finding .date = self .scan_date .date ()
612
- # Save it. Don't dedupe before endpoints are added.
613
613
unsaved_finding = self .process_cve (unsaved_finding )
614
+ # Save it. Don't dedupe before endpoints are added.
614
615
unsaved_finding .save_no_options ()
615
616
finding = unsaved_finding
616
617
# Force parsers to use unsaved_tags (stored in finding_post_processing function below)
@@ -653,8 +654,8 @@ def finding_post_processing(
653
654
# Process vulnerability IDs
654
655
if finding_from_report .unsaved_vulnerability_ids :
655
656
finding .unsaved_vulnerability_ids = finding_from_report .unsaved_vulnerability_ids
656
-
657
- return self .process_vulnerability_ids (self . process_cve ( finding ) )
657
+ # legacy cve field has already been processed/set earlier
658
+ return self .process_vulnerability_ids (finding )
658
659
659
660
def process_groups_for_all_findings (
660
661
self ,
0 commit comments