Skip to content

Commit b98e182

Browse files
authored
Merge pull request #10784 from DefectDojo/master-into-dev/2.37.2-2.38.0-dev
Release: Merge back 2.37.2 into dev from: master-into-dev/2.37.2-2.38.0-dev
2 parents 26a5af2 + 02b317e commit b98e182

File tree

15 files changed

+78
-18
lines changed

15 files changed

+78
-18
lines changed

.github/workflows/build-docker-images-for-testing.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
id: docker_build
3838
uses: docker/build-push-action@v6
3939
timeout-minutes: 10
40+
env:
41+
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
4042
with:
4143
context: .
4244
push: false
@@ -53,4 +55,4 @@ jobs:
5355
with:
5456
name: ${{ matrix.docker-image }}
5557
path: ${{ matrix.docker-image }}-${{ matrix.os }}_img
56-
retention-days: 1
58+
retention-days: 1

.github/workflows/k8s-tests.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,28 @@ jobs:
7070
echo "pgsql=${{ env.HELM_PG_DATABASE_SETTINGS }}" >> $GITHUB_ENV
7171
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
7272
73-
- name: Deploying Djano application with ${{ matrix.databases }} ${{ matrix.brokers }}
74-
timeout-minutes: 10
73+
- name: Deploying Django application with ${{ matrix.databases }} ${{ matrix.brokers }}
74+
timeout-minutes: 15
7575
run: |-
7676
helm install \
7777
--timeout 800s \
78+
--wait \
79+
--wait-for-jobs \
7880
defectdojo \
7981
./helm/defectdojo \
8082
--set django.ingress.enabled=true \
8183
--set imagePullPolicy=Never \
8284
${{ env[matrix.databases] }} \
8385
${{ env[matrix.brokers] }} \
8486
--set createSecret=true \
85-
--set tag=${{ matrix.os }} \
86-
# --set imagePullSecrets=defectdojoregistrykey
87+
--set tag=${{ matrix.os }}
8788
8889
- name: Check deployment status
90+
if: always()
8991
run: |-
90-
kubectl get pods
91-
kubectl get ingress
92-
kubectl get services
92+
kubectl get all,ingress # all = pods, services, deployments, replicasets, statefulsets, jobs
93+
helm status defectdojo
94+
helm history defectdojo
9395
9496
- name: Check Application
9597
timeout-minutes: 10

.github/workflows/release-x-manual-docker-containers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
if: ${{ matrix.os == 'debian' }}
6666
uses: docker/build-push-action@v6
6767
env:
68+
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
6869
REPO_ORG: ${{ env.repoorg }}
6970
docker-image: ${{ matrix.docker-image }}
7071
with:
@@ -79,6 +80,7 @@ jobs:
7980
if: ${{ matrix.os == 'alpine' }}
8081
uses: docker/build-push-action@v6
8182
env:
83+
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
8284
REPO_ORG: ${{ env.repoorg }}
8385
docker-image: ${{ matrix.docker-image }}
8486
with:

docs/content/en/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The open-source edition is [available on
4040
GitHub](https://github.com/DefectDojo/django-DefectDojo).
4141

4242
A running example is available on [our demo server](https://demo.defectdojo.org),
43-
using the credentials `admin` / `defectdojo@demo#appsec`. Note: The demo
43+
using the credentials `admin` / `1Defectdojo@demo#appsec`. Note: The demo
4444
server is refreshed regularly and provisioned with some sample data.
4545

4646
### DefectDojo Pro and Enterprise

dojo/filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ def filter(self, qs, value):
15431543

15441544
class FindingFilterHelper(FilterSet):
15451545
title = CharFilter(lookup_expr="icontains")
1546-
date = DateFromToRangeFilter(field_name="date", label="Date Discovered")
1546+
date = DateRangeFilter(field_name="date", label="Date Discovered")
15471547
on = DateFilter(field_name="date", lookup_expr="exact", label="On")
15481548
before = DateFilter(field_name="date", lookup_expr="lt", label="Before")
15491549
after = DateFilter(field_name="date", lookup_expr="gt", label="After")
@@ -2874,6 +2874,7 @@ class Meta:
28742874
class ReportFindingFilterHelper(FilterSet):
28752875
title = CharFilter(lookup_expr="icontains", label="Name")
28762876
date = DateFromToRangeFilter(field_name="date", label="Date Discovered")
2877+
date_recent = DateRangeFilter(field_name="date", label="Relative Date")
28772878
severity = MultipleChoiceFilter(choices=SEVERITY_CHOICES)
28782879
active = ReportBooleanFilter()
28792880
is_mitigated = ReportBooleanFilter()

dojo/templates/dojo/custom_html_report_endpoint_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ <h6>References</h6>
151151
<pre>{{ finding.references|markdown_render }}</pre>
152152
{% endif %}
153153
{% if include_finding_images %}
154-
{% include "dojo/snippets/file_images.html" with size='original' obj=finding format="HTML" %}
154+
{% include "dojo/snippets/file_images.html" with size='original' obj=finding format="INLINE" %}
155155
{% endif %}
156156
{% if include_finding_notes %}
157157
{% with notes=finding.notes.all|get_public_notes %}

dojo/templates/dojo/custom_html_report_finding_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h6>References</h6>
154154
{% endif %}
155155

156156
{% if include_finding_images %}
157-
{% include "dojo/snippets/file_images.html" with size='original' obj=finding format="HTML" %}
157+
{% include "dojo/snippets/file_images.html" with size='original' obj=finding format="INLINE" %}
158158
{% endif %}
159159
{% if include_finding_notes %}
160160
{% with notes=finding.notes.all|get_public_notes %}

dojo/templates/dojo/snippets/file_images.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ <h6>Images</h6>
99
<p class="text-center">No images found.</p>
1010
{% endfor %}
1111
{% endwith %}
12+
{% elif format == "INLINE" %}
13+
{% with images=obj|file_images %}
14+
<h6>Images</h6>
15+
{% for pic in images %}
16+
<p><img src="{{ pic|inline_image }}" style="max-width: 85%" alt="Finding Image"></p>
17+
{% empty %}
18+
<p class="text-center">No images found.</p>
19+
{% endfor %}
20+
{% endwith %}
1221
{% else %}
1322
{% with images=obj|file_images %}
1423
{% for pic in images %}

dojo/templatetags/display_tags.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import base64
12
import datetime
23
import logging
4+
import mimetypes
35
from itertools import chain
46

57
import bleach
@@ -420,6 +422,18 @@ def pic_token(context, image, size):
420422
return reverse("download_finding_pic", args=[token.token])
421423

422424

425+
@register.filter
426+
def inline_image(image_file):
427+
try:
428+
if img_type := mimetypes.guess_type(image_file.file.name)[0]:
429+
if img_type.startswith("image/"):
430+
img_data = base64.b64encode(image_file.file.read())
431+
return f"data:{img_type};base64, {img_data.decode('utf-8')}"
432+
except:
433+
pass
434+
return ""
435+
436+
423437
@register.filter
424438
def file_images(obj):
425439
return get_file_images(obj, return_objects=True)

dojo/tools/nmap/parser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@ def get_findings(self, file, test):
9696
service_info += (
9797
"**Extra Info:** {}\n".format(port_element.find("service").attrib["extrainfo"])
9898
)
99-
10099
description += service_info
101-
100+
if script := port_element.find("script"):
101+
if script_id := script.attrib.get("id"):
102+
description += f"**Script ID:** {script_id}\n"
103+
if script_output := script.attrib.get("output"):
104+
description += f"**Script Output:** {script_output}\n"
102105
description += "\n\n"
103106

104107
# manage some script like

0 commit comments

Comments
 (0)