Skip to content

Commit 499039d

Browse files
committed
update
1 parent f32fa7a commit 499039d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

dojo/importers/default_reimporter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ def process_matched_mitigated_finding(
431431
to cover circumstances where mitigation timestamps are different, and
432432
decide which one to honor
433433
"""
434+
if existing_finding.fix_available != unsaved_finding.fix_available:
435+
existing_finding.fix_available = unsaved_finding.fix_available
436+
434437
# if the reimported item has a mitigation time, we can compare
435438
if unsaved_finding.is_mitigated:
436439
# The new finding is already mitigated, so nothing to change on the
@@ -537,9 +540,8 @@ def process_matched_active_finding(
537540
# First check that the existing finding is definitely not mitigated
538541
if not (existing_finding.mitigated and existing_finding.is_mitigated):
539542
logger.debug("Reimported item matches a finding that is currently open.")
540-
if unsaved_finding.fix_available:
541-
logger.debug("Reimported finding has a fix available now.")
542-
existing_finding.fix_available = True
543+
if existing_finding.fix_available != unsaved_finding.fix_available:
544+
existing_finding.fix_available = unsaved_finding.fix_available
543545
if unsaved_finding.is_mitigated:
544546
logger.debug("Reimported mitigated item matches a finding that is currently open, closing.")
545547
# TODO: Implement a date comparison for opened defectdojo findings before closing them by reimporting,

0 commit comments

Comments
 (0)