Skip to content

Commit bc33ee5

Browse files
authored
Merge pull request #10951 from DefectDojo/release/2.38.3
Release: Merge release into master from: release/2.38.3
2 parents e952d18 + 27924c9 commit bc33ee5

80 files changed

Lines changed: 1805 additions & 641 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/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A clear and concise description of what you expected to happen.
3636
- DefectDojo version (see footer) or commit message: [use `git show -s --format="[%ci] %h: %s [%d]"`]
3737

3838
**Logs**
39-
Use `docker-compose logs` (or similar, depending on your deployment method) to get the logs and add the relevant sections here showing the error occurring (if applicable).
39+
Use `docker compose logs` (or similar, depending on your deployment method) to get the logs and add the relevant sections here showing the error occurring (if applicable).
4040

4141
**Sample scan files**
4242
If applicable, add sample scan files to help reproduce your problem.

.github/ISSUE_TEMPLATE/support_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A clear and concise description of what you expected to happen.
3636
- DefectDojo version (see footer) or commit message: [use `git show -s --format="[%ci] %h: %s [%d]"`]
3737

3838
**Logs**
39-
Use `docker-compose logs` (or similar, depending on your deployment method) to get the logs and add the relevant sections here showing the error occurring (if applicable).
39+
Use `docker compose logs` (or similar, depending on your deployment method) to get the logs and add the relevant sections here showing the error occurring (if applicable).
4040

4141
**Sample scan files**
4242
If applicable, add sample scan files to help reproduce your problem.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ jobs:
4545
tags: defectdojo/defectdojo-${{ matrix.docker-image }}:${{ matrix.os }}
4646
file: Dockerfile.${{ matrix.docker-image }}-${{ matrix.os }}
4747
outputs: type=docker,dest=${{ matrix.docker-image }}-${{ matrix.os }}_img
48-
cache-from: type=gha,scope=${{ matrix.docker-image }}
49-
cache-to: type=gha,mode=max,scope=${{ matrix.docker-image }}
50-
48+
5149
# export docker images to be used in next jobs below
5250
- name: Upload image ${{ matrix.docker-image }} as artifact
5351
timeout-minutes: 10

.github/workflows/release-3-master-into-dev.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ jobs:
5050
CURRENT_CHART_VERSION=$(grep -oP 'version: (\K\S*)?' helm/defectdojo/Chart.yaml | head -1)
5151
sed -ri "0,/version/s/version: \S+/$(echo "version: $CURRENT_CHART_VERSION" | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')-dev/" helm/defectdojo/Chart.yaml
5252
53+
- name: Update settings SHA
54+
run: sha256sum dojo/settings/settings.dist.py | cut -d ' ' -f1 > dojo/settings/.settings.dist.py.sha256sum
55+
5356
- name: Check numbers
5457
run: |
5558
grep version dojo/__init__.py
5659
grep appVersion helm/defectdojo/Chart.yaml
5760
grep version components/package.json
61+
cat dojo/settings/.settings.dist.py.sha256sum
5862
5963
- name: Create upgrade notes to documentation
6064
run: |
@@ -132,11 +136,15 @@ jobs:
132136
CURRENT_CHART_VERSION=$(grep -oP 'version: (\K\S*)?' helm/defectdojo/Chart.yaml | head -1)
133137
sed -ri "0,/version/s/version: \S+/$(echo "version: $CURRENT_CHART_VERSION" | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')-dev/" helm/defectdojo/Chart.yaml
134138
139+
- name: Update settings SHA
140+
run: sha256sum dojo/settings/settings.dist.py | cut -d ' ' -f1 > dojo/settings/.settings.dist.py.sha256sum
141+
135142
- name: Check numbers
136143
run: |
137144
grep version dojo/__init__.py
138145
grep appVersion helm/defectdojo/Chart.yaml
139146
grep version components/package.json
147+
cat dojo/settings/.settings.dist.py.sha256sum
140148
141149
- name: Push version changes
142150
uses: stefanzweifel/git-auto-commit-action@v5.0.1

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ jobs:
4949
id: buildx
5050
uses: docker/setup-buildx-action@v3
5151

52-
- name: Cache Docker layers
53-
uses: actions/cache@v4
54-
env:
55-
docker-image: ${{ matrix.docker-image }}
56-
with:
57-
path: /tmp/.buildx-cache-${{ env.docker-image }}
58-
key: ${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name }}-${{ github.sha }}-${{ github.run_id }}
59-
restore-keys: |
60-
${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name}}-${{ github.sha }}
61-
${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-${{ env.workflow_name }}
62-
${{ runner.os }}-buildx-${{ env.docker-image }}-${{ matrix.os }}-
63-
6452
- name: Build and push images with debian
6553
if: ${{ matrix.os == 'debian' }}
6654
uses: docker/build-push-action@v6
@@ -73,8 +61,6 @@ jobs:
7361
tags: ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}-${{ matrix.os }}, ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}, ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:latest
7462
file: ./Dockerfile.${{ env.docker-image }}-${{ matrix.os }}
7563
context: .
76-
cache-from: type=local,src=/tmp/.buildx-cache-${{ env.docker-image }}
77-
cache-to: type=local,dest=/tmp/.buildx-cache-${{ env.docker-image }}
7864

7965
- name: Build and push images with alpine
8066
if: ${{ matrix.os == 'alpine' }}
@@ -88,9 +74,3 @@ jobs:
8874
tags: ${{ env.REPO_ORG }}/defectdojo-${{ env.docker-image}}:${{ github.event.inputs.release_number }}-${{ matrix.os }}
8975
file: ./Dockerfile.${{ env.docker-image }}-${{ matrix.os }}
9076
context: .
91-
cache-from: type=local,src=/tmp/.buildx-cache-${{ env.docker-image }}
92-
cache-to: type=local,dest=/tmp/.buildx-cache-${{ env.docker-image }}
93-
# platforms: ${{ matrix.platform }}
94-
95-
- name: Image digest
96-
run: echo ${{ steps.docker_build.outputs.digest }}

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

docker/docker-compose-check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ current=$(docker compose version --short)
66

77
echo 'Checking docker compose version'
88
if [[ $main -lt 2 ]]; then
9-
echo "$current is not a supported docker-compose version, please upgrade to the minimum supported version: 2.0"
9+
echo "$current is not a supported 'docker compose' version, please upgrade to the minimum supported version: 2.0"
1010
exit 1
1111
elif [[ $main -eq 1 ]]; then
1212
if [[ $minor -lt 28 ]]; then
13-
echo "$current is not supported docker-compose version, please upgrade to minimal supported version:1.28"
13+
echo "$current is not supported 'docker compose' version, please upgrade to minimal supported version:1.28"
1414
exit 1
1515
fi
1616
fi

docker/extra_settings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If a file if placed here, it will be copied on startup to `dojo/settings/local_s
66
For an example, see [template-local_settings](../../dojo/settings/template-local_settings)
77

88
Please note this copy action could fail if you have mounted the full `dojo/` folder, but that is owned by a different user/group.
9-
That's why this copy action only happens in docker-compose release mode, and not in dev/debug/unit_tests/integration_tests modes.
9+
That's why this copy action only happens in docker compose release mode, and not in dev/debug/unit_tests/integration_tests modes.
1010

1111
For advanced usage you can also place a `settings.dist.py` or `settings.py` file. These will also be copied on startup to dojo/settings.
1212

docs/content/en/contributing/how-to-write-a-parser.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All commands assume that you're located at the root of the django-DefectDojo clo
1515
- Checkout `dev` and make sure you're up to date with the latest changes.
1616
- It's advised that you create a dedicated branch for your development, such as `git checkout -b parser-name`.
1717

18-
It is easiest to use the docker-compose deployment as it has hot-reload capbility for uWSGI.
18+
It is easiest to use the docker compose deployment as it has hot-reload capbility for uWSGI.
1919
Set up your environment to use the debug environment:
2020

2121
`$ docker/setEnv.sh debug`
@@ -27,7 +27,7 @@ Please have a look at [DOCKER.md](https://github.com/DefectDojo/django-DefectDoj
2727
You will want to build your docker images locally, and eventually pass in your local user's `uid` to be able to write to the image (handy for database migration files). Assuming your user's `uid` is `1000`, then:
2828

2929
{{< highlight bash >}}
30-
$ docker-compose build --build-arg uid=1000
30+
$ docker compose build --build-arg uid=1000
3131
{{< /highlight >}}
3232

3333
## Which files do you need to modify?
@@ -279,7 +279,7 @@ This ensures the file is closed at the end of the with statement, even if an exc
279279

280280
### Test database
281281

282-
To test your unit tests locally, you first need to grant some rights. Get your MySQL root password from the docker-compose logs, login as root and issue the following commands:
282+
To test your unit tests locally, you first need to grant some rights. Get your MySQL root password from the docker compose logs, login as root and issue the following commands:
283283

284284
{{< highlight mysql >}}
285285
MYSQL> grant all privileges on test_defectdojo.* to defectdojo@'%';
@@ -291,17 +291,17 @@ MYSQL> flush privileges;
291291
This local command will launch the unit test for your new parser
292292

293293
{{< highlight bash >}}
294-
$ docker-compose exec uwsgi bash -c 'python manage.py test unittests.tools.<your_unittest_py_file>.<main_class_name> -v2'
294+
$ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.<your_unittest_py_file>.<main_class_name> -v2'
295295
{{< /highlight >}}
296296

297297
Example for the blackduck hub parser:
298298

299299
{{< highlight bash >}}
300-
$ docker-compose exec uwsgi bash -c 'python manage.py test unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser -v2'
300+
$ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser -v2'
301301
{{< /highlight >}}
302302

303303
{{% alert title="Information" color="info" %}}
304-
If you want to run all unit tests, simply run `$ docker-compose exec uwsgi bash -c 'python manage.py test unittests -v2'`
304+
If you want to run all unit tests, simply run `$ docker compose exec uwsgi bash -c 'python manage.py test unittests -v2'`
305305
{{% /alert %}}
306306

307307
### Endpoint validation
@@ -330,7 +330,7 @@ In the event where you'd have to change the model, e.g. to increase a database c
330330
* Create a new migration file in dojo/db_migrations by running and including as part of your PR
331331

332332
{{< highlight bash >}}
333-
$ docker-compose exec uwsgi bash -c 'python manage.py makemigrations -v2'
333+
$ docker compose exec uwsgi bash -c 'python manage.py makemigrations -v2'
334334
{{< /highlight >}}
335335

336336
### Accept a different type of file to upload

docs/content/en/getting_started/running-in-production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ draft: false
55
weight: 4
66
---
77

8-
## Production use with docker-compose
8+
## Production use with docker compose
99

1010
The docker-compose.yml file in this repository is fully functional to evaluate DefectDojo in your local environment.
1111

@@ -76,7 +76,7 @@ Dockerfile.django-* for in-file references.
7676

7777
You can execute the following command to see the configuration:
7878

79-
`docker-compose exec celerybeat bash -c "celery -A dojo inspect stats"`
79+
`docker compose exec celerybeat bash -c "celery -A dojo inspect stats"`
8080
and see what is in effect.
8181

8282
#### Asynchronous Import

0 commit comments

Comments
 (0)