Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions dojo/importers/default_reimporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,28 @@ def process_findings(
deduplicationLogger.debug(f"found {len(matched_findings)} findings matching with current new finding")
# Determine how to proceed based on whether matches were found or not
if matched_findings:
existing_finding = matched_findings[0]
finding, force_continue = self.process_matched_finding(
unsaved_finding,
existing_finding,
)
# Determine if we should skip the rest of the loop
if force_continue:
continue
# Update endpoints on the existing finding with those on the new finding
if finding.dynamic_finding:
logger.debug(
"Re-import found an existing dynamic finding for this new "
"finding. Checking the status of endpoints",
)
self.endpoint_manager.update_endpoint_status(
existing_finding,
for existing_finding in matched_findings:
finding, force_continue = self.process_matched_finding(
unsaved_finding,
self.user,
existing_finding,
)
# Determine if we should skip the rest of the loop
if force_continue:
continue

last_existing_finding = existing_finding

if last_existing_finding is not None:
# Update endpoints on the existing finding with those on the new finding
if finding.dynamic_finding:
logger.debug(
"Re-import found an existing dynamic finding for this new "
"finding. Checking the status of endpoints",
)
self.endpoint_manager.update_endpoint_status(
last_existing_finding,
unsaved_finding,
self.user,
)
else:
finding = self.process_finding_that_was_not_matched(unsaved_finding)
Expand Down
Loading