Skip to content

Commit f5fe4ba

Browse files
authored
Merge pull request #14607 from DefectDojo/release/2.56.4
Release: Merge release into master from: release/2.56.4
2 parents 3907211 + fbedadd commit f5fe4ba

33 files changed

Lines changed: 142000 additions & 285 deletions

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# "tests/import_scanner_test.py",
7777
# "tests/zap.py",
7878
]
79-
os: [alpine, debian]
79+
os: [debian]
8080
v3_feature_locations: [true, false]
8181
exclude:
8282
# standalone create endpoint page is gone in v3

.github/workflows/performance-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
2424
with:
2525
path: built-docker-image
26-
pattern: built-docker-image-django-alpine-linux-amd64
26+
pattern: built-docker-image-django-debian-linux-amd64
2727
merge-multiple: true
2828

2929
- name: Load docker images
3030
timeout-minutes: 10
3131
run: |
32-
docker load -i built-docker-image/django-alpine-linux-amd64_img
32+
docker load -i built-docker-image/django-debian-linux-amd64_img
3333
docker images
3434
3535
- name: Set unit-test mode
@@ -45,7 +45,7 @@ jobs:
4545
-f docker/docker-compose.override.performance_tests_cicd.yml \
4646
up -d --no-deps uwsgi
4747
env:
48-
DJANGO_VERSION: alpine
48+
DJANGO_VERSION: debian
4949

5050
- name: Run performance tests (auto-update counts)
5151
timeout-minutes: 15

.github/workflows/rest-framework-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ${{ inputs.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
1717
strategy:
1818
matrix:
19-
os: [alpine, debian]
19+
os: [debian]
2020

2121
steps:
2222
# Replace slashes so we can use this in filenames

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.56.3",
3+
"version": "2.56.4",
44
"license" : "BSD-3-Clause",
55
"private": true,
66
"dependencies": {

docs/content/get_started/open_source/installation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ See instructions in [DOCKER.md](<https://github.com/DefectDojo/django-DefectDojo
1818

1919
[SaaS link](https://defectdojo.com/platform)
2020

21+
---
22+
## **Docker Image Variants**
23+
---
24+
25+
DefectDojo publishes Docker images in multiple variants:
26+
27+
| | AMD64 | ARM64 |
28+
|---|---|---|
29+
| **Debian** | ✅ Supported | ⚠️ Unit tested |
30+
| **Alpine** | ⚠️ Community | ⚠️ Community |
31+
32+
**Debian on AMD64** is the officially supported and tested configuration. All CI tests (unit, integration, and performance) run against this combination.
33+
34+
**Debian on ARM64** is built and covered by unit tests in CI, but integration and performance tests are not run against it.
35+
36+
The **Alpine** variants are built and published but are not covered by any automated testing. Use them at your own risk.
37+
2138
---
2239
## **Options for the brave (not officially supported)**
2340
---
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: 'Upgrading to DefectDojo Version 2.56.4'
3+
toc_hide: true
4+
weight: -20260319
5+
description: JFrog Xray API Summary Artifact parser deduplication
6+
---
7+
8+
## JFrog Xray API Summary Artifact parser deduplication
9+
Deduplication of JFrog Xray API Summary Artifact findings is improved for newly imported findings.
10+
11+
To apply this on existing data, you need to recompute the hashes for this specific parser [see docs](https://docs.defectdojo.com/triage_findings/finding_deduplication/os__deduplication_tuning/#after-changing-deduplication-settings).

docs/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.56.3"
7+
__version__ = "2.56.4"
88
__url__ = "https://github.com/DefectDojo/django-DefectDojo" # noqa: RUF067
99
__docs__ = "https://documentation.defectdojo.com" # noqa: RUF067

dojo/celery.py

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,44 @@ def apply_async(self, args=None, kwargs=None, **options):
7676
return super().apply_async(args=args, kwargs=kwargs, **options)
7777

7878

79-
class PgHistoryTask(DojoAsyncTask):
79+
class PluggableContextTask(DojoAsyncTask):
80+
81+
"""
82+
Extends DojoAsyncTask with pluggable context managers loaded from settings.
83+
84+
CELERY_TASK_CONTEXT_MANAGERS is a list of dotted paths to callables that
85+
return context managers. Each task execution is wrapped in all of them.
86+
This replaces the celery signal-based approach (task_prerun/task_postrun)
87+
which does not work reliably with prefork worker pools.
88+
"""
89+
90+
def __call__(self, *args, **kwargs):
91+
from contextlib import ExitStack # noqa: PLC0415
92+
93+
from django.utils.module_loading import import_string # noqa: PLC0415
94+
95+
cm_paths = getattr(settings, "CELERY_TASK_CONTEXT_MANAGERS", [])
96+
if not cm_paths:
97+
return super().__call__(*args, **kwargs)
98+
99+
# ExitStack ensures all entered context managers are properly exited
100+
# (via __exit__) even if the task raises an exception, so cleanup
101+
# and batch dispatch always happen.
102+
with ExitStack() as stack:
103+
for path in cm_paths:
104+
cm_factory = import_string(path)
105+
stack.enter_context(cm_factory())
106+
return super().__call__(*args, **kwargs)
107+
108+
109+
class PgHistoryTask(PluggableContextTask):
80110

81111
"""
82112
Custom Celery base task that automatically applies pghistory context.
83113
84-
This class inherits from DojoAsyncTask to provide:
114+
This class inherits from PluggableContextTask to provide:
85115
- User context injection and task tracking (from DojoAsyncTask)
116+
- Pluggable context managers from settings (from PluggableContextTask)
86117
- Automatic pghistory context application (from this class)
87118
88119
When a task is dispatched via dojo_dispatch_task or dojo_async_task, the current

dojo/db_migrations/max_migration.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)