Skip to content

Commit 3f037d2

Browse files
authored
Merge pull request #12188 from DefectDojo/master-into-bugfix/2.45.0-2.46.0-dev
Release: Merge back 2.45.0 into bugfix from: master-into-bugfix/2.45.0-2.46.0-dev
2 parents 08138f9 + 80052ac commit 3f037d2

File tree

144 files changed

+1404
-516
lines changed

Some content is hidden

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

144 files changed

+1404
-516
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ Dockerfile.* @mtesauro @Maffooch
77
docker-compose.* @mtesauro @Maffooch
88
/docker/ @mtesauro @Maffooch
99
# Documentation changes
10-
/docs/ @paulOsinski @valentijnscholten @Maffooch
10+
/docs/content/ @paulOsinski @valentijnscholten @Maffooch
1111
# Kubernetes should be reviewed by reviewed first by those that know it
12-
/helm/ @cneill @kiblik
12+
/helm/ @cneill @kiblik @Maffooch
1313
# Anything UI related needs to be checked out by those with the eye for it
1414
/dojo/static/ @blakeaowens @Maffooch
1515
/dojo/templates/ @blakeaowens @Maffooch
1616
# Any model changes should be closely looked at
17-
/dojo/models.py @Maffooch
17+
/dojo/models.py @Maffooch
18+
# All other code changes should be reviewed by someone
19+
* @Maffooch @mtesauro

.github/pr-reminder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dogboat": "sean@defectdojo.com",
2020
"cneill": "charles@defectdojo.com",
2121
"hblankenship": "harold@defectdojo.com",
22+
"valentijnscholten": "valentijn@defectdojo.com",
2223
}
2324

2425

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,38 @@ on:
44
# inspired by https://github.com/orgs/community/discussions/26801 we take the runs-on as parameter so we can run arm64 on native hardwarde
55
workflow_dispatch:
66
inputs:
7-
runner:
7+
platform:
88
type: string
9-
default: "ubuntu-latest"
9+
default: "linux/amd64"
1010
workflow_call:
1111
inputs:
12-
runner:
12+
platform:
1313
type: string
14-
default: "ubuntu-latest"
14+
default: "linux/amd64"
1515

1616
jobs:
1717
build:
1818
name: Build Docker Images
19-
runs-on: ${{ inputs.runner }}
19+
runs-on: ${{ inputs.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
2020
strategy:
2121
matrix:
22-
# integration tests are only build (and run) on debian x64
22+
# integration tests are only build (and run) on debian linux/amd64
2323
docker-image: [django, nginx, integration-tests]
2424
os: [alpine, debian]
25-
runner: ["${{ inputs.runner }}"]
25+
platform: ["${{ inputs.platform }}"]
2626
exclude:
2727
- docker-image: integration-tests
2828
os: alpine
2929
- docker-image: integration-tests
30-
runner: ubuntu-24.04-arm
30+
platform: linux/arm64
3131

3232
steps:
33-
- name: Show Platform
34-
run: echo Runner value for this run = ${{ inputs.runner }}
33+
# Replace slashes so we can use this in filenames
34+
- name: Set-platform
35+
run: |
36+
platform=${{ inputs.platform }}
37+
echo "PLATFORM=${platform//\//-}" >> $GITHUB_ENV
38+
echo $GITHUB_ENV
3539
3640
- name: Checkout
3741
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -56,13 +60,13 @@ jobs:
5660
push: false
5761
tags: defectdojo/defectdojo-${{ matrix.docker-image }}:${{ matrix.os }},${{ env.IMAGE_REPOSITORY }}/defectdojo-${{ matrix.docker-image }}:${{ matrix.os }}
5862
file: Dockerfile.${{ matrix.docker-image }}-${{ matrix.os }}
59-
outputs: type=docker,dest=${{ matrix.docker-image }}-${{ matrix.os }}-${{ inputs.runner }}_img
63+
outputs: type=docker,dest=${{ matrix.docker-image }}-${{ matrix.os }}-${{ env.PLATFORM }}_img
6064

6165
# export docker images to be used in next jobs below
6266
- name: Upload image ${{ matrix.docker-image }} as artifact
6367
timeout-minutes: 15
64-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
68+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6569
with:
66-
name: built-docker-image-${{ matrix.docker-image }}-${{ matrix.os }}-${{ inputs.runner }}
67-
path: ${{ matrix.docker-image }}-${{ matrix.os }}-${{ inputs.runner }}_img
70+
name: built-docker-image-${{ matrix.docker-image }}-${{ matrix.os }}-${{ env.PLATFORM }}
71+
path: ${{ matrix.docker-image }}-${{ matrix.os }}-${{ env.PLATFORM }}_img
6872
retention-days: 1

.github/workflows/fetch-oas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: docker compose down
5252

5353
- name: Upload oas.${{ matrix.file-type }} as artifact
54-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
54+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5555
with:
5656
name: oas-${{ matrix.file-type }}
5757
path: oas.${{ matrix.file-type }}

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
extended: true
2020

2121
- name: Setup Node
22-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
22+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
2323
with:
24-
node-version: '22.5.1'
24+
node-version: '22.14.0'
2525

2626
- name: Cache dependencies
27-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
27+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2828
with:
2929
path: ~/.npm
3030
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
# load docker images from build jobs
4747
- name: Load images from artifacts
48-
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
48+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
4949
with:
5050
path: built-docker-image
5151
pattern: built-docker-image-*
@@ -54,9 +54,9 @@ jobs:
5454
- name: Load docker images
5555
timeout-minutes: 10
5656
run: |-
57-
docker load -i built-docker-image/nginx-${{ matrix.os }}-ubuntu-latest_img
58-
docker load -i built-docker-image/django-${{ matrix.os }}-ubuntu-latest_img
59-
docker load -i built-docker-image/integration-tests-debian-ubuntu-latest_img
57+
docker load -i built-docker-image/nginx-${{ matrix.os }}-linux-amd64_img
58+
docker load -i built-docker-image/django-${{ matrix.os }}-linux-amd64_img
59+
docker load -i built-docker-image/integration-tests-debian-linux-amd64_img
6060
docker images
6161
6262
- name: Set integration-test mode

.github/workflows/k8s-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
minikube status
4949
5050
- name: Load images from artifacts
51-
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
51+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
5252
with:
5353
path: built-docker-image
5454
pattern: built-docker-image-*
@@ -58,8 +58,8 @@ jobs:
5858
timeout-minutes: 15
5959
run: |-
6060
eval $(minikube docker-env)
61-
docker load -i built-docker-image/nginx-${{ matrix.os }}-ubuntu-latest_img
62-
docker load -i built-docker-image/django-${{ matrix.os }}-ubuntu-latest_img
61+
docker load -i built-docker-image/nginx-${{ matrix.os }}-linux-amd64_img
62+
docker load -i built-docker-image/django-${{ matrix.os }}-linux-amd64_img
6363
docker images
6464
6565
- name: Configure HELM repos
@@ -75,7 +75,7 @@ jobs:
7575
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
7676
7777
- name: Deploying Django application with ${{ matrix.databases }} ${{ matrix.brokers }}
78-
timeout-minutes: 15
78+
timeout-minutes: 15
7979
run: |-
8080
helm install \
8181
--timeout 800s \

.github/workflows/release-1-create-pr.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,38 @@ jobs:
1919
create_pr:
2020
runs-on: ubuntu-latest
2121
steps:
22-
22+
- id: Set-GitHub-org
23+
run: echo "GITHUB_ORG=${GITHUB_REPOSITORY%%/*}" >> $GITHUB_ENV
24+
2325
- name: Checkout from_branch branch
2426
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2527
with:
2628
ref: ${{ github.event.inputs.from_branch }}
27-
29+
2830
- name: Create release branch
2931
if: ${{ !startsWith(github.event.inputs.from_branch, 'release/') }}
3032
run: |
3133
echo "NEW_BRANCH=release/${{ github.event.inputs.release_number }}" >> $GITHUB_ENV
32-
34+
3335
- name: Use existing release branch
3436
if: startsWith(github.event.inputs.from_branch, 'release/')
3537
run: |
3638
echo "NEW_BRANCH=${{ github.event.inputs.from_branch }}" >> $GITHUB_ENV
37-
39+
3840
- name: Configure git
3941
run: |
4042
git config --global user.name "${{ env.GIT_USERNAME }}"
4143
git config --global user.email "${{ env.GIT_EMAIL }}"
42-
44+
4345
- name: Push branch
4446
if: "!startsWith('${{ github.event.inputs.from_branch }}', 'release/')"
4547
run: git push origin HEAD:${NEW_BRANCH}
46-
48+
4749
- name: Checkout release branch
4850
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4951
with:
5052
ref: ${{ env.NEW_BRANCH }}
51-
53+
5254
- name: Update version numbers in key files
5355
run: |
5456
sed -ri 's/__version__ = ".*"/__version__ = "${{ github.event.inputs.release_number }}"/' dojo/__init__.py
@@ -82,18 +84,14 @@ jobs:
8284
commit_author: "${{ env.GIT_USERNAME }} <${{ env.GIT_EMAIL }}>"
8385
commit_message: "Update versions in application files"
8486
branch: ${{ env.NEW_BRANCH }}
85-
- id: set-repo-org
86-
run: echo "repoorg=${GITHUB_REPOSITORY%%/*}" >> $GITHUB_ENV
87-
87+
8888
- name: Create Pull Request
89-
env:
90-
REPO_ORG: ${{ env.repoorg }}
9189
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
9290
with:
9391
github-token: ${{ secrets.GITHUB_TOKEN }}
9492
script: |
9593
github.rest.pulls.create({
96-
owner: '${{ env.REPO_ORG }}',
94+
owner: '${{ env.GITHUB_ORG }}',
9795
repo: 'django-DefectDojo',
9896
title: 'Release: Merge release into master from: ${{ env.NEW_BRANCH }}',
9997
body: `Release triggered by \`${ process.env.GITHUB_ACTOR }\``,

.github/workflows/release-2-tag-docker-push.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,27 @@ jobs:
4040
release_number: ${{ github.event.inputs.release_number }}
4141
secrets: inherit
4242

43-
release-docker-containers:
43+
publish-docker-containers:
44+
strategy:
45+
matrix:
46+
platform: ['linux/amd64', 'linux/arm64']
47+
fail-fast: false
4448
needs: tag
4549
uses: ./.github/workflows/release-x-manual-docker-containers.yml
4650
with:
4751
release_number: ${{ github.event.inputs.release_number }}
52+
platform: ${{ matrix.platform }}
53+
secrets: inherit
54+
55+
publish-container-digests:
56+
needs: publish-docker-containers
57+
uses: ./.github/workflows/release-x-manual-merge-container-digests.yml
58+
with:
59+
release_number: ${{ github.event.inputs.release_number }}
4860
secrets: inherit
4961

5062
release-drafter:
51-
needs: release-docker-containers
63+
needs: publish-container-digests
5264
uses: ./.github/workflows/release-drafter.yml
5365
with:
5466
version: ${{ github.event.inputs.release_number }}

0 commit comments

Comments
 (0)