diff --git a/components/package.json b/components/package.json index d8bb10d3e1..cab02bf8dc 100644 --- a/components/package.json +++ b/components/package.json @@ -1,6 +1,6 @@ { "name": "defectdojo", - "version": "2.26.2", + "version": "2.26.3", "license" : "BSD-3-Clause", "private": true, "dependencies": { diff --git a/dojo/__init__.py b/dojo/__init__.py index 00a62f05b4..ba68a05c49 100644 --- a/dojo/__init__.py +++ b/dojo/__init__.py @@ -4,6 +4,6 @@ # Django starts so that shared_task will use this app. from .celery import app as celery_app # noqa -__version__ = '2.26.2' +__version__ = '2.26.3' __url__ = 'https://github.com/DefectDojo/django-DefectDojo' __docs__ = 'https://documentation.defectdojo.com' diff --git a/dojo/templates/dojo/product.html b/dojo/templates/dojo/product.html index bc40861bad..8067ea2c7c 100644 --- a/dojo/templates/dojo/product.html +++ b/dojo/templates/dojo/product.html @@ -338,7 +338,7 @@

}, colReorder: true, "columns": [ - { "data": "action" }, + { "data": "action", "searchable": false }, { "data": "product" }, { "data": "tags" }, { "data": "criticality" , render: function (data, type, row) { diff --git a/dojo/test/views.py b/dojo/test/views.py index 79fc7112c9..f6ea0920a1 100644 --- a/dojo/test/views.py +++ b/dojo/test/views.py @@ -25,7 +25,7 @@ ReImportScanForm, JIRAFindingForm, JIRAImportScanForm, \ FindingBulkUpdateForm, CopyTestForm from dojo.models import IMPORT_UNTOUCHED_FINDING, Finding, Finding_Group, Test, Note_Type, BurpRawRequestResponse, Endpoint, Stub_Finding, \ - Finding_Template, Cred_Mapping, System_Settings, Test_Import, Product_API_Scan_Configuration, Test_Import_Finding_Action + Finding_Template, Cred_Mapping, Test_Import, Product_API_Scan_Configuration, Test_Import_Finding_Action from dojo.tools.factory import get_choices_sorted, get_scan_types_sorted from dojo.utils import add_error_message_to_response, add_field_errors_to_response, add_success_message_to_response, get_page_items, get_page_items_and_count, add_breadcrumb, get_cal_event, process_notifications, get_system_setting, \ @@ -74,7 +74,6 @@ def view_test(request, tid): stub_findings = Stub_Finding.objects.filter(test=test) cred_test = Cred_Mapping.objects.filter(test=test).select_related('cred_id').order_by('cred_id') creds = Cred_Mapping.objects.filter(engagement=test.engagement).select_related('cred_id').order_by('cred_id') - system_settings = get_object_or_404(System_Settings, id=1) if request.method == 'POST': user_has_permission_or_403(request.user, test, Permissions.Note_Add) if note_type_activation: diff --git a/dojo/tools/anchorectl_policies/parser.py b/dojo/tools/anchorectl_policies/parser.py index 3b0970cfb6..1df2fa94f9 100644 --- a/dojo/tools/anchorectl_policies/parser.py +++ b/dojo/tools/anchorectl_policies/parser.py @@ -30,46 +30,47 @@ def get_findings(self, filename, test): items = list() try: for image in data: - for result in image["detail"]: - try: - gate = result["gate"] - description = result["description"] - policy_id = result["policyId"] - status = result["status"] - image_name = result["tag"] - trigger_id = result["triggerId"] - repo, tag = image_name.split(":", 2) - severity = map_gate_action_to_severity(status) - vulnerability_id = extract_vulnerability_id(trigger_id) - title = ( - policy_id - + " - gate|" - + gate - + " - trigger|" - + trigger_id - ) - find = Finding( - title=title, - test=test, - description=description, - severity=severity, - references="Policy ID: {}\nTrigger ID: {}".format( - policy_id, trigger_id - ), - file_path=search_filepath(description), - component_name=repo, - component_version=tag, - date=find_date, - static_finding=True, - dynamic_finding=False, - ) - if vulnerability_id: - find.unsaved_vulnerability_ids = [vulnerability_id] - items.append(find) - except (KeyError, IndexError) as err: - raise ValueError( - "Invalid format: {} key not found".format(err) - ) + if image['detail'] is not None: + for result in image["detail"]: + try: + gate = result["gate"] + description = result["description"] + policy_id = result["policyId"] + status = result["status"] + image_name = result["tag"] + trigger_id = result["triggerId"] + repo, tag = image_name.split(":", 2) + severity = map_gate_action_to_severity(status) + vulnerability_id = extract_vulnerability_id(trigger_id) + title = ( + policy_id + + " - gate|" + + gate + + " - trigger|" + + trigger_id + ) + find = Finding( + title=title, + test=test, + description=description, + severity=severity, + references="Policy ID: {}\nTrigger ID: {}".format( + policy_id, trigger_id + ), + file_path=search_filepath(description), + component_name=repo, + component_version=tag, + date=find_date, + static_finding=True, + dynamic_finding=False, + ) + if vulnerability_id: + find.unsaved_vulnerability_ids = [vulnerability_id] + items.append(find) + except (KeyError, IndexError) as err: + raise ValueError( + "Invalid format: {} key not found".format(err) + ) except AttributeError as err: # import empty policies without error (e.g. policies or images # objects are not a dictionary) diff --git a/helm/defectdojo/Chart.yaml b/helm/defectdojo/Chart.yaml index 4bb53b08ef..fd0f56b53e 100644 --- a/helm/defectdojo/Chart.yaml +++ b/helm/defectdojo/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: "2.26.2" +appVersion: "2.26.3" description: A Helm chart for Kubernetes to install DefectDojo name: defectdojo -version: 1.6.86 +version: 1.6.87 icon: https://www.defectdojo.org/img/favicon.ico maintainers: - name: madchap