Skip to content

Commit

Permalink
Merge pull request DefectDojo#10626 from DefectDojo/release/2.36.5
Browse files Browse the repository at this point in the history
Release: Merge release into master from: release/2.36.5
  • Loading branch information
Maffooch authored Jul 24, 2024
2 parents 5e39f4c + 3f5ad07 commit c58a297
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "defectdojo",
"version": "2.36.4",
"version": "2.36.5",
"license" : "BSD-3-Clause",
"private": true,
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions docs/content/en/usage/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ details about the deduplication process : switch

### Deduplication - APIv2 parameters

- `skip_duplicates`: if true, duplicates are not
inserted at all
- `close_old_findings` : if true, findings that are not
duplicates and that were in the previous scan of the same type
(example ZAP) for the same engagement (or product in case of
Expand Down
2 changes: 1 addition & 1 deletion dojo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Django starts so that shared_task will use this app.
from .celery import app as celery_app # noqa: F401

__version__ = '2.36.4'
__version__ = '2.36.5'
__url__ = 'https://github.com/DefectDojo/django-DefectDojo'
__docs__ = 'https://documentation.defectdojo.com'
9 changes: 9 additions & 0 deletions dojo/finding/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ def close_finding(request, fid):
form.cleaned_data.get("mitigated_by") or request.user
)
finding.is_mitigated = True
finding.under_review = False
finding.last_reviewed = finding.mitigated
finding.last_reviewed_by = request.user
finding.false_p = form.cleaned_data.get("false_p", False)
Expand All @@ -1265,6 +1266,8 @@ def close_finding(request, fid):
status.mitigated = True
status.last_modified = timezone.now()
status.save()
# Clear the risk acceptance, if present
ra_helper.risk_unaccept(finding)

# Manage the jira status changes
push_to_jira = False
Expand Down Expand Up @@ -1431,13 +1434,16 @@ def reopen_finding(request, fid):
finding.is_mitigated = False
finding.last_reviewed = finding.mitigated
finding.last_reviewed_by = request.user
finding.under_review = False
endpoint_status = finding.status_finding.all()
for status in endpoint_status:
status.mitigated_by = None
status.mitigated_time = None
status.mitigated = False
status.last_modified = timezone.now()
status.save()
# Clear the risk acceptance, if present
ra_helper.risk_unaccept(finding)

# Manage the jira status changes
push_to_jira = False
Expand Down Expand Up @@ -1759,6 +1765,9 @@ def clear_finding_review(request, fid):

finding = form.save(commit=False)

if finding.is_mitigated:
finding.mitigated = now
finding.mitigated_by = request.user
finding.under_review = False
finding.last_reviewed = now
finding.last_reviewed_by = request.user
Expand Down
2 changes: 1 addition & 1 deletion dojo/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ class ClearFindingReviewForm(forms.ModelForm):

class Meta:
model = Finding
fields = ['active', 'verified', 'false_p', 'out_of_scope', 'duplicate']
fields = ['active', 'verified', 'false_p', 'out_of_scope', 'duplicate', "is_mitigated"]


class ReviewFindingForm(forms.Form):
Expand Down
7 changes: 5 additions & 2 deletions dojo/importers/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ def compress_options(self):
class_name = None
# Get the actual class if available
if len(id_list) > 0:
class_name = item_type
id_type = type(id_list[0])
# Only define the class name if we are able to make a query on the object in decompression
if isinstance(id_type, int):
class_name = item_type if item_type is None else id_type
# Ensure we are not setting a class name as None
if class_name is type(None):
if class_name is type(None) or class_name is None:
compressed_fields[field] = value
# Add the list to the dict
else:
Expand Down
4 changes: 2 additions & 2 deletions helm/defectdojo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: "2.36.4"
appVersion: "2.36.5"
description: A Helm chart for Kubernetes to install DefectDojo
name: defectdojo
version: 1.6.141
version: 1.6.142
icon: https://www.defectdojo.org/img/favicon.ico
maintainers:
- name: madchap
Expand Down

0 comments on commit c58a297

Please sign in to comment.