Skip to content

Commit

Permalink
Merge pull request #8679 from DefectDojo/release/2.26.3
Browse files Browse the repository at this point in the history
Release: Merge release into master from: release/2.26.3
  • Loading branch information
Maffooch authored Sep 18, 2023
2 parents 82f26c3 + cbaca61 commit 358dde8
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 47 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.26.2",
"version": "2.26.3",
"license" : "BSD-3-Clause",
"private": true,
"dependencies": {
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

__version__ = '2.26.2'
__version__ = '2.26.3'
__url__ = 'https://github.com/DefectDojo/django-DefectDojo'
__docs__ = 'https://documentation.defectdojo.com'
2 changes: 1 addition & 1 deletion dojo/templates/dojo/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ <h3 class="has-filters">
},
colReorder: true,
"columns": [
{ "data": "action" },
{ "data": "action", "searchable": false },
{ "data": "product" },
{ "data": "tags" },
{ "data": "criticality" , render: function (data, type, row) {
Expand Down
3 changes: 1 addition & 2 deletions dojo/test/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down Expand Up @@ -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:
Expand Down
81 changes: 41 additions & 40 deletions dojo/tools/anchorectl_policies/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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.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
Expand Down

0 comments on commit 358dde8

Please sign in to comment.