Skip to content
Merged
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
8 changes: 5 additions & 3 deletions dojo/importers/default_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Test_Import,
)
from dojo.notifications.helper import create_notification
from dojo.utils import perform_product_grading
from dojo.utils import get_full_url, perform_product_grading
from dojo.validators import clean_tags

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -365,11 +365,13 @@ def close_old_findings(
old_findings = old_findings.filter(Q(service__isnull=True) | Q(service__exact=""))
# Update the status of the findings and any endpoints
for old_finding in old_findings:
url = str(get_full_url(reverse("view_test", args=(self.test.id,))))
test_title = str(self.test.title)
self.mitigate_finding(
old_finding,
(
"This finding has been automatically closed "
"as it is not present anymore in recent scans."
'This Finding has been automatically closed by the Test: \n "' + test_title + '"\n' + url +
"\n\nThis is because this Finding is not present anymore in recent scans."
),
finding_groups_enabled=self.findings_groups_enabled,
product_grading_option=False,
Expand Down