You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.debug('%i: skipping existing finding (it is marked as false positive:%s and/or out of scope:%s or is a risk accepted:%s): %i:%s:%s:%s', i, finding.false_p, finding.out_of_scope, finding.risk_accepted, finding.id, finding, finding.component_name, finding.component_version)
logger.debug("New imported finding and already existing finding are both mitigated but have different dates, not taking action")
95
-
# TODO: implement proper date-aware reimporting mechanism, if an imported finding is closed more recently than the defectdojo finding, then there might be details in the scanner that should be added
87
+
# if the reimported item has a mitigation time, we can compare
logger.debug("New imported finding and already existing finding are both mitigated but have different dates, not taking action")
97
+
# TODO: implement proper date-aware reimporting mechanism, if an imported finding is closed more recently than the defectdojo finding, then there might be details in the scanner that should be added
98
+
continue
99
+
else:
100
+
# even if there is no mitigation time, skip it, because both the current finding and the reimported finding are is_mitigated
96
101
continue
97
-
ifnotitem.mitigated:
102
+
else:
98
103
logger.debug('%i: reactivating: %i:%s:%s:%s', i, finding.id, finding, finding.component_name, finding.component_version)
logger.debug('%i: updating existing finding: %i:%s:%s:%s', i, finding.id, finding, finding.component_name, finding.component_version)
140
145
ifnot (finding.mitigatedandfinding.is_mitigated):
141
146
logger.debug('Reimported item matches a finding that is currently open.')
142
-
ifitem.mitigated:
147
+
ifitem.is_mitigated:
148
+
logger.debug('Reimported mitigated item matches a finding that is currently open, closing.')
143
149
# TODO: Implement a date comparison for opened defectdojo findings before closing them by reimporting, as they could be force closed by the scanner but a DD user forces it open ?
144
150
logger.debug('%i: closing: %i:%s:%s:%s', i, finding.id, finding, finding.component_name, finding.component_version)
0 commit comments