Skip to content

Commit 3553489

Browse files
authored
Merge pull request #10746 from DefectDojo/release/2.37.1
Release: Merge release into master from: release/2.37.1
2 parents 51cea97 + 1deb915 commit 3553489

34 files changed

+2824
-18
lines changed

.github/workflows/k8s-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# are tested (https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html#available-versions)
2929
- databases: pgsql
3030
brokers: redis
31-
k8s: 'v1.26.11'
31+
k8s: 'v1.30.3'
3232
os: debian
3333
steps:
3434
- name: Checkout
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup Minikube
3838
uses: manusa/actions-setup-minikube@v2.11.0
3939
with:
40-
minikube version: 'v1.31.2'
40+
minikube version: 'v1.33.1'
4141
kubernetes version: ${{ matrix.k8s }}
4242
driver: docker
4343
start args: '--addons=ingress --cni calico'

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "defectdojo",
3-
"version": "2.37.0",
3+
"version": "2.37.1",
44
"license" : "BSD-3-Clause",
55
"private": true,
66
"dependencies": {

docker/entrypoint-unit-tests-devDocker.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ EOF
5454
echo "Unit Tests"
5555
echo "------------------------------------------------------------"
5656

57-
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel" || {
57+
# Removing parallel and shuffle for now to maintain stability
58+
python3 manage.py test unittests -v 3 --keepdb --no-input --exclude-tag="non-parallel" || {
5859
exit 1;
5960
}
60-
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel" || {
61+
python3 manage.py test unittests -v 3 --keepdb --no-input --tag="non-parallel" || {
6162
exit 1;
6263
}
6364

docker/entrypoint-unit-tests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ python3 manage.py migrate
8080
echo "Unit Tests"
8181
echo "------------------------------------------------------------"
8282

83-
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --parallel --exclude-tag="non-parallel" || {
83+
# Removing parallel and shuffle for now to maintain stability
84+
python3 manage.py test unittests -v 3 --keepdb --no-input --exclude-tag="non-parallel" || {
8485
exit 1;
8586
}
86-
python3 manage.py test unittests -v 3 --keepdb --no-input --failfast --shuffle --tag="non-parallel" || {
87+
python3 manage.py test unittests -v 3 --keepdb --no-input --tag="non-parallel" || {
8788
exit 1;
8889
}

docs/content/en/getting_started/upgrading/2.37.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ MySQL and RabbitMQ have been removed from the following places:
1414
- Helm Chart
1515
- Unit/Integration CI/CD Tests
1616

17-
There are no other special instructions for upgrading to 2.37.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.36.0) for the contents of the release.
17+
There are no other special instructions for upgrading to 2.37.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.37.0) for the contents of the release.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "AppCheck Web Application Scanner"
3+
toc_hide: true
4+
---
5+
Accepts AppCheck Web Application Scanner output in .json format.
6+
7+
### Sample Scan Data
8+
Sample AppCheck Web Application Scanner scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/appcheck_web_application_scanner).

dojo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# Django starts so that shared_task will use this app.
55
from .celery import app as celery_app # noqa: F401
66

7-
__version__ = "2.37.0"
7+
__version__ = "2.37.1"
88
__url__ = "https://github.com/DefectDojo/django-DefectDojo"
99
__docs__ = "https://documentation.defectdojo.com"

dojo/cred/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def new_cred(request):
3838
return render(request, "dojo/new_cred.html", {"tform": tform})
3939

4040

41-
@user_is_authorized(Product, Permissions.Product_View, "pid")
41+
@user_is_authorized(Product, Permissions.Product_Edit, "pid")
4242
def all_cred_product(request, pid):
4343
prod = get_object_or_404(Product, id=pid)
4444
creds = Cred_Mapping.objects.filter(product=prod).order_by("cred_id__name")

dojo/endpoint/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from django.conf import settings
77
from django.contrib import messages
88
from django.contrib.admin.utils import NestedObjects
9+
from django.core.exceptions import PermissionDenied
910
from django.db import DEFAULT_DB_ALIAS
1011
from django.db.models import Count, Q, QuerySet
1112
from django.http import HttpResponseRedirect
@@ -178,7 +179,7 @@ def view_endpoint_host(request, eid):
178179
return process_endpoint_view(request, eid, host_view=True)
179180

180181

181-
@user_is_authorized(Endpoint, Permissions.Endpoint_View, "eid")
182+
@user_is_authorized(Endpoint, Permissions.Endpoint_Edit, "eid")
182183
def edit_endpoint(request, eid):
183184
endpoint = get_object_or_404(Endpoint, id=eid)
184185

@@ -468,6 +469,9 @@ def prefetch_for_endpoints(endpoints):
468469

469470
def migrate_endpoints_view(request):
470471

472+
if not request.user.is_superuser:
473+
raise PermissionDenied
474+
471475
view_name = "Migrate endpoints"
472476

473477
html_log = clean_hosts_run(apps=apps, change=(request.method == "POST"))

dojo/forms.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import dojo.jira_link.helper as jira_helper
3232
from dojo.authorization.roles_permissions import Permissions
3333
from dojo.endpoint.utils import endpoint_filter, endpoint_get_or_create, validate_endpoints_to_add
34+
from dojo.engagement.queries import get_authorized_engagements
3435
from dojo.finding.queries import get_authorized_findings
3536
from dojo.group.queries import get_authorized_groups, get_group_member_roles
3637
from dojo.models import (
@@ -3550,6 +3551,18 @@ def __init__(self, *args, **kwargs):
35503551
self.fields["product"].queryset = get_authorized_products(Permissions.Engagement_Add)
35513552

35523553

3554+
class ExistingEngagementForm(forms.Form):
3555+
engagement = forms.ModelChoiceField(
3556+
queryset=Engagement.objects.none(),
3557+
required=True,
3558+
widget=forms.widgets.Select(),
3559+
help_text="Select which Engagement to link the Questionnaire to")
3560+
3561+
def __init__(self, *args, **kwargs):
3562+
super().__init__(*args, **kwargs)
3563+
self.fields["engagement"].queryset = get_authorized_engagements(Permissions.Engagement_Edit).order_by("-target_start")
3564+
3565+
35533566
class ConfigurationPermissionsForm(forms.Form):
35543567

35553568
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)