Skip to content

Commit 98dd435

Browse files
authored
Merge branch 'dev' into bugfix
2 parents f40a814 + 7e52520 commit 98dd435

385 files changed

Lines changed: 4148 additions & 2719 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/k8s-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/checkout@v4
3636

3737
- name: Setup Minikube
38-
uses: manusa/actions-setup-minikube@v2.11.0
38+
uses: manusa/actions-setup-minikube@v2.12.0
3939
with:
4040
minikube version: 'v1.33.1'
4141
kubernetes version: ${{ matrix.k8s }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
run: docker/setEnv.sh unit_tests_cicd
3535

3636
# phased startup so we can use the exit code from unit test container
37-
- name: Start Postgres
38-
run: docker compose up -d postgres
37+
- name: Start Postgres and webhook.endpoint
38+
run: docker compose up -d postgres webhook.endpoint
3939

4040
# no celery or initializer needed for unit tests
4141
- name: Unit tests

components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"google-code-prettify": "^1.0.0",
2727
"jquery": "^3.7.1",
2828
"jquery-highlight": "3.5.0",
29-
"jquery-ui": "1.13.3",
29+
"jquery-ui": "1.14.0",
3030
"jquery.cookie": "1.4.1",
3131
"jquery.flot.tooltip": "^0.9.0",
3232
"jquery.hotkeys": "jeresig/jquery.hotkeys#master",
@@ -35,7 +35,7 @@
3535
"metismenu": "~3.0.7",
3636
"moment": "^2.30.1",
3737
"morris.js": "morrisjs/morris.js",
38-
"pdfmake": "^0.2.12",
38+
"pdfmake": "^0.2.13",
3939
"startbootstrap-sb-admin-2": "1.0.7"
4040
},
4141
"engines": {

components/yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -678,12 +678,12 @@ jquery-highlight@3.5.0:
678678
dependencies:
679679
jquery ">= 1.0.0"
680680

681-
jquery-ui@1.13.3:
682-
version "1.13.3"
683-
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.13.3.tgz#d9f5292b2857fa1f2fdbbe8f2e66081664eb9bc5"
684-
integrity sha512-D2YJfswSJRh/B8M/zCowDpNFfwsDmtfnMPwjJTyvl+CBqzpYwQ+gFYIbUUlzijy/Qvoy30H1YhoSui4MNYpRwA==
681+
jquery-ui@1.14.0:
682+
version "1.14.0"
683+
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.14.0.tgz#b75d417826f0bab38125f907356d2e3313a9c6d5"
684+
integrity sha512-mPfYKBoRCf0MzaT2cyW5i3IuZ7PfTITaasO5OFLAQxrHuI+ZxruPa+4/K1OMNT8oElLWGtIxc9aRbyw20BKr8g==
685685
dependencies:
686-
jquery ">=1.8.0 <4.0.0"
686+
jquery ">=1.12.0 <5.0.0"
687687

688688
jquery.cookie@1.4.1:
689689
version "1.4.1"
@@ -699,7 +699,7 @@ jquery.hotkeys@jeresig/jquery.hotkeys#master:
699699
version "0.2.0"
700700
resolved "https://codeload.github.com/jeresig/jquery.hotkeys/tar.gz/f24f1da275aab7881ab501055c256add6f690de4"
701701

702-
"jquery@>= 1.0.0", jquery@>=1.7, jquery@>=1.7.0, "jquery@>=1.8.0 <4.0.0", jquery@^3.7.1:
702+
"jquery@>= 1.0.0", "jquery@>=1.12.0 <5.0.0", jquery@>=1.7, jquery@>=1.7.0, jquery@^3.7.1:
703703
version "3.7.1"
704704
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
705705
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
@@ -824,10 +824,10 @@ path-parse@^1.0.7:
824824
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
825825
integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
826826

827-
pdfmake@^0.2.12:
828-
version "0.2.12"
829-
resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.2.12.tgz#5156f91ff73797947942aa342423bedaa0c0bc93"
830-
integrity sha512-TFsqaG6KVtk+TWermmJNNwom3wmB/xiz07prM74KBhdM+7pz3Uwq2b0uoqhhQRn6cYUTpL8lXZY6xF011o1YcQ==
827+
pdfmake@^0.2.13:
828+
version "0.2.13"
829+
resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.2.13.tgz#ea43fe9f0c8de1e5ec7b08486d6f4f8bbb8619e4"
830+
integrity sha512-qeVE9Bzjm0oPCitH4/HYM/XCGTwoeOAOVAXPnV3s0kpPvTLkTF/bAF4jzorjkaIhXGQhzYk6Xclt0hMDYLY93w==
831831
dependencies:
832832
"@foliojs-fork/linebreak" "^1.1.1"
833833
"@foliojs-fork/pdfkit" "^0.14.0"

docker-compose.override.dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ services:
5353
published: 8025
5454
protocol: tcp
5555
mode: host
56+
"webhook.endpoint":
57+
image: mccutchen/go-httpbin:v2.15.0@sha256:24528cf5229d0b70065ac27e6c9e4d96f5452a84a3ce4433e56573c18d96827a

docker-compose.override.unit_tests.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
services:
33
nginx:
4-
image: busybox:1.36.1-musl
4+
image: busybox:1.37.0-musl
55
entrypoint: ['echo', 'skipping', 'nginx']
66
volumes:
77
- defectdojo_media_unit_tests:/usr/share/nginx/html/media
@@ -30,13 +30,13 @@ services:
3030
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
3131
DD_CELERY_BROKER_PARAMS: ''
3232
celerybeat:
33-
image: busybox:1.36.1-musl
33+
image: busybox:1.37.0-musl
3434
entrypoint: ['echo', 'skipping', 'celery beat']
3535
celeryworker:
36-
image: busybox:1.36.1-musl
36+
image: busybox:1.37.0-musl
3737
entrypoint: ['echo', 'skipping', 'celery worker']
3838
initializer:
39-
image: busybox:1.36.1-musl
39+
image: busybox:1.37.0-musl
4040
entrypoint: ['echo', 'skipping', 'initializer']
4141
postgres:
4242
ports:
@@ -49,8 +49,10 @@ services:
4949
volumes:
5050
- defectdojo_postgres_unit_tests:/var/lib/postgresql/data
5151
redis:
52-
image: busybox:1.36.1-musl
52+
image: busybox:1.37.0-musl
5353
entrypoint: ['echo', 'skipping', 'redis']
54+
"webhook.endpoint":
55+
image: mccutchen/go-httpbin:v2.15.0@sha256:24528cf5229d0b70065ac27e6c9e4d96f5452a84a3ce4433e56573c18d96827a
5456
volumes:
5557
defectdojo_postgres_unit_tests: {}
5658
defectdojo_media_unit_tests: {}

docker-compose.override.unit_tests_cicd.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
services:
33
nginx:
4-
image: busybox:1.36.1-musl
4+
image: busybox:1.37.0-musl
55
entrypoint: ['echo', 'skipping', 'nginx']
66
volumes:
77
- defectdojo_media_unit_tests:/usr/share/nginx/html/media
@@ -29,13 +29,13 @@ services:
2929
DD_CELERY_BROKER_PATH: '/dojo.celerydb.sqlite'
3030
DD_CELERY_BROKER_PARAMS: ''
3131
celerybeat:
32-
image: busybox:1.36.1-musl
32+
image: busybox:1.37.0-musl
3333
entrypoint: ['echo', 'skipping', 'celery beat']
3434
celeryworker:
35-
image: busybox:1.36.1-musl
35+
image: busybox:1.37.0-musl
3636
entrypoint: ['echo', 'skipping', 'celery worker']
3737
initializer:
38-
image: busybox:1.36.1-musl
38+
image: busybox:1.37.0-musl
3939
entrypoint: ['echo', 'skipping', 'initializer']
4040
postgres:
4141
ports:
@@ -48,8 +48,10 @@ services:
4848
volumes:
4949
- defectdojo_postgres_unit_tests:/var/lib/postgresql/data
5050
redis:
51-
image: busybox:1.36.1-musl
51+
image: busybox:1.37.0-musl
5252
entrypoint: ['echo', 'skipping', 'redis']
53+
"webhook.endpoint":
54+
image: mccutchen/go-httpbin:v2.15.0@sha256:24528cf5229d0b70065ac27e6c9e4d96f5452a84a3ce4433e56573c18d96827a
5355
volumes:
5456
defectdojo_postgres_unit_tests: {}
5557
defectdojo_media_unit_tests: {}

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ services:
103103
source: ./docker/extra_settings
104104
target: /app/docker/extra_settings
105105
postgres:
106-
image: postgres:16.4-alpine@sha256:492898505cb45f9835acc327e98711eaa9298ed804e0bb36f29e08394229550d
106+
image: postgres:17.0-alpine@sha256:14195b0729fce792f47ae3c3704d6fd04305826d57af3b01d5b4d004667df174
107107
environment:
108108
POSTGRES_DB: ${DD_DATABASE_NAME:-defectdojo}
109109
POSTGRES_USER: ${DD_DATABASE_USER:-defectdojo}
110110
POSTGRES_PASSWORD: ${DD_DATABASE_PASSWORD:-defectdojo}
111111
volumes:
112112
- defectdojo_postgres:/var/lib/postgresql/data
113113
redis:
114-
image: redis:7.2.5-alpine@sha256:0bc09d9f486508aa42ecc2f18012bb1e3a1b2744ef3a6ad30942fa12579f0b03
114+
image: redis:7.2.5-alpine@sha256:6aaf3f5e6bc8a592fbfe2cccf19eb36d27c39d12dab4f4b01556b7449e7b1f44
115115
volumes:
116116
- defectdojo_redis:/data
117117
volumes:

docker/install_chrome_dependencies.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,47 @@
1010

1111

1212
def find_packages(library_name):
13-
stdout = run_command(["apt-file", "search", library_name])
13+
stdout, stderr, status_code = run_command(["apt-file", "search", library_name])
14+
# Check if ldd has failed for a good reason, or if there are no results
15+
if status_code != 0:
16+
# Any other case should be be caught
17+
msg = f"apt-file search (exit code {status_code}): {stderr}"
18+
raise ValueError(msg)
19+
1420
if not stdout.strip():
1521
return []
1622
libs = [line.split(":")[0] for line in stdout.strip().split("\n")]
1723
return list(set(libs))
1824

1925

2026
def run_command(cmd, cwd=None, env=None):
27+
# Do not raise exception here because some commands are too loose with negative exit codes
2128
result = subprocess.run(cmd, cwd=cwd, env=env, capture_output=True, text=True, check=False)
22-
return result.stdout
29+
return result.stdout.strip(), result.stderr.strip(), result.returncode
2330

2431

2532
def ldd(file_path):
26-
stdout = run_command(["ldd", file_path])
27-
# For simplicity, I'm assuming if we get an error, the code is non-zero.
28-
try:
29-
result = subprocess.run(
30-
["ldd", file_path], capture_output=True, text=True, check=False,
31-
)
32-
stdout = result.stdout
33-
code = result.returncode
34-
except subprocess.CalledProcessError:
35-
stdout = ""
36-
code = 1
37-
return stdout, code
33+
stdout, stderr, status_code = run_command(["ldd", file_path])
34+
# Check if ldd has failed for a good reason, or if there are no results
35+
if status_code != 0:
36+
# It is often the case when stdout will be empty. This is not an error
37+
if not stdout:
38+
return stdout, status_code
39+
# Any other case should be be caught
40+
msg = f"ldd (exit code {status_code}): {stderr}"
41+
raise ValueError(msg)
42+
43+
return stdout, status_code
3844

3945

4046
raw_deps = ldd("/opt/chrome/chrome")
4147
dependencies = raw_deps[0].splitlines()
42-
4348
missing_deps = {
4449
r[0].strip()
4550
for d in dependencies
4651
for r in [d.split("=>")]
4752
if len(r) == 2 and r[1].strip() == "not found"
4853
}
49-
5054
missing_packages = []
5155
for d in missing_deps:
5256
all_packages = find_packages(d)
@@ -59,5 +63,4 @@ def ldd(file_path):
5963
]
6064
for p in packages:
6165
missing_packages.append(p)
62-
6366
logger.info("missing_packages: " + (" ".join(missing_packages)))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 'Upgrading to DefectDojo Version 2.39.x'
3+
toc_hide: true
4+
weight: -20240903
5+
description: No special instructions.
6+
---
7+
There are no special instructions for upgrading to 2.39.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.39.0) for the contents of the release.

0 commit comments

Comments
 (0)