Skip to content
Merged
Changes from 2 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
7 changes: 4 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,12 @@ 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 = get_full_url(reverse("view_test", args=(self.test.id,)))
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 "' + self.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
Loading