Skip to content

Commit 6f9bfbd

Browse files
Merge remote-tracking branch 'upstream/dev' into django_5.2
2 parents 570a55c + b5eaa75 commit 6f9bfbd

546 files changed

Lines changed: 28571 additions & 6437 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/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ updates:
1111
versions:
1212
- ">= 5.a"
1313
- "< 6"
14+
- dependency-name: boto3
15+
update-types: ["version-update:semver-minor"]
1416
- package-ecosystem: npm
1517
directory: "/components"
1618
schedule:

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This checklist is for your information.
2626
- [ ] Bugfixes should be submitted against the `bugfix` branch.
2727
- [ ] Give a meaningful name to your PR, as it may end up being used in the release notes.
2828
- [ ] Your code is flake8 compliant.
29-
- [ ] Your code is python 3.12 compliant.
29+
- [ ] Your code is python 3.13 compliant.
3030
- [ ] If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
3131
- [ ] Model changes must include the necessary migrations in the dojo/db_migrations folder.
3232
- [ ] Add applicable tests to the unit tests.

.github/renovate.json

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,66 @@
11
{
22
"extends": [
3-
"config:base"
3+
"config:recommended"
44
],
55
"dependencyDashboard": true,
66
"dependencyDashboardApproval": false,
7-
"baseBranches": ["dev"],
7+
"baseBranchPatterns": ["dev"],
88
"rebaseWhen": "conflicted",
99
"separateMinorPatch": true,
10-
"ignorePaths": ["requirements.txt", "requirements-lint.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
10+
"ignorePaths": [
11+
"requirements.txt",
12+
"requirements-lint.txt",
13+
"components/package.json",
14+
"components/package-lock.json",
15+
"dojo/components/yarn.lock",
16+
"dojo/components/package.json",
17+
"Dockerfile**"
18+
],
1119
"ignoreDeps": [],
1220
"packageRules": [{
13-
"packagePatterns": ["*"],
14-
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",
21+
"matchPackageNames": ["*"],
22+
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{newVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",
1523
"commitMessageSuffix": "({{packageFile}})",
1624
"labels": ["dependencies"]
25+
},{
26+
"description": "Update renovate weekly (sundays) - They are releasing new versions too often, so it is a bit noisy, and keeping renovating a bit older does not create vulnerabilities in DD",
27+
"matchDatasources": "github-releases",
28+
"matchPackageNames": "renovatebot/renovate",
29+
"separateMinorPatch": false,
30+
"schedule": ["* * * * 0"]
31+
},{
32+
"description": "Minikube does not like freshly released k8s. We need to wait some time so it will be adopted",
33+
"matchDatasources": [
34+
"custom.endoflife-oldest-maintained",
35+
"github-releases"
36+
],
37+
"matchPackageNames": [
38+
"kubernetes",
39+
"kubernetes/kubernetes"
40+
],
41+
"minimumReleaseAge": "2 days"
1742
}],
18-
"registryAliases": {
19-
"bitnami": "https://charts.bitnami.com/bitnami"
20-
}
43+
"customDatasources": {
44+
"endoflife-oldest-maintained": {
45+
"defaultRegistryUrlTemplate": "https://endoflife.date/api/v1/products/{{packageName}}",
46+
"format": "json",
47+
"transformTemplates": [
48+
"{ \"releases\": [$.result.releases[isMaintained = true]^(<eolFrom)[0].latest.{\"version\": name, \"releaseTimestamp\": date, \"changelogUrl\": link}], \"sourceUrl\": \"https://github.com/kubernetes/kubernetes\", \"homepage\": \"https://kubernetes.io/\" }"
49+
]
50+
}
51+
},
52+
"customManagers": [
53+
{
54+
"customType": "regex",
55+
"managerFilePatterns": [
56+
"/^.github/workflows//"
57+
],
58+
"matchStrings": [
59+
"\\w*:\\s\"(?<currentValue>\\S+)\"\\s#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s",
60+
"\\w*:\\s'(?<currentValue>\\S+)'\\s#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s",
61+
"\\w*:\\s(?<currentValue>\\S+)\\s#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s"
62+
],
63+
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
64+
}
65+
]
2166
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
echo $GITHUB_ENV
4141
4242
- name: Checkout
43-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4444
with:
4545
persist-credentials: false
4646

@@ -67,7 +67,7 @@ jobs:
6767
# export docker images to be used in next jobs below
6868
- name: Upload image ${{ matrix.docker-image }} as artifact
6969
timeout-minutes: 15
70-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
70+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7171
with:
7272
name: built-docker-image-${{ matrix.docker-image }}-${{ matrix.os }}-${{ env.PLATFORM }}
7373
path: ${{ matrix.docker-image }}-${{ matrix.os }}-${{ env.PLATFORM }}_img

.github/workflows/detect-merge-conflicts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- master
88
- bugfix
99
- release/*
10-
10+
1111
pull_request_target:
1212
types: [synchronize]
1313

@@ -16,6 +16,8 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: check if prs are conflicted
19+
# we experience a high error rate so we allow this to fail but still have the check become green on the PR
20+
continue-on-error: true
1921
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
2022
with:
2123
dirtyLabel: "conflicts-detected"

.github/workflows/fetch-oas.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
file-type: [yaml, json]
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2626
with:
2727
ref: release/${{ env.release_version }}
2828

@@ -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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
54+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
5555
with:
5656
name: oas-${{ matrix.file-type }}
5757
path: oas.${{ matrix.file-type }}

.github/workflows/gh-pages.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ name: github-pages
33
on:
44
workflow_dispatch:
55
push:
6+
paths:
7+
- 'docs/**'
68
branches:
79
- master
10+
- bugfix
811

912
# Taken from https://github.com/marketplace/actions/hugo-setup#%EF%B8%8F-workflow-for-autoprefixer-and-postcss-cli
1013
# Both builds have to be one worflow as otherwise one publish will overwrite the other
@@ -15,13 +18,13 @@ jobs:
1518
- name: Setup Hugo
1619
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
1720
with:
18-
hugo-version: '0.140.1'
21+
hugo-version: '0.152.2' # renovate: datasource=github-releases depName=gohugoio/hugo
1922
extended: true
2023

2124
- name: Setup Node
22-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
25+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2326
with:
24-
node-version: '22.20.0'
27+
node-version: '24.11.1' # TODO: Renovate helper might not be needed here - needs to be fully tested
2528

2629
- name: Cache dependencies
2730
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -32,7 +35,7 @@ jobs:
3235
${{ runner.os }}-node-
3336
3437
- name: Checkout
35-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
38+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3639
with:
3740
submodules: recursive
3841
fetch-depth: 0

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ jobs:
5454

5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
57+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5858

5959
# load docker images from build jobs
6060
- name: Load images from artifacts
61-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
61+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
6262
with:
6363
path: built-docker-image
6464
pattern: built-docker-image-*
@@ -76,7 +76,7 @@ jobs:
7676
run: ln -s docker-compose.override.integration_tests.yml docker-compose.override.yml
7777

7878
- name: Start Dojo
79-
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
79+
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi valkey
8080
env:
8181
DJANGO_VERSION: ${{ matrix.os }}
8282
NGINX_VERSION: alpine

.github/workflows/k8s-tests.yml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ on:
55

66
env:
77
DD_HOSTNAME: defectdojo.default.minikube.local
8-
HELM_REDIS_BROKER_SETTINGS: " \
9-
--set redis.enabled=true \
10-
--set celery.broker=redis \
11-
--set createRedisSecret=true \
12-
"
13-
HELM_PG_DATABASE_SETTINGS: " \
14-
--set postgresql.enabled=true \
15-
--set createPostgresqlSecret=true \
16-
"
178
jobs:
189
setting_minikube_cluster:
1910
name: Kubernetes Deployment
@@ -23,20 +14,20 @@ jobs:
2314
matrix:
2415
include:
2516
# databases, broker and k8s are independent, so we don't need to test each combination
26-
# lastest k8s version (https://kubernetes.io/releases/) and oldest supported version from aws
27-
# are tested (https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html#available-versions)
28-
- databases: pgsql
29-
brokers: redis
30-
k8s: 'v1.34.0'
17+
# lastest k8s version (https://kubernetes.io/releases/) and the oldest officially supported version
18+
# are tested (https://kubernetes.io/releases/)
19+
- k8s: 'v1.34.2' # renovate: datasource=github-releases depName=kubernetes/kubernetes versioning=loose
20+
os: debian
21+
- k8s: '1.32.10' # renovate: datasource=custom.endoflife-oldest-maintained depName=kubernetes
3122
os: debian
3223
steps:
3324
- name: Checkout
34-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3526

3627
- name: Setup Minikube
3728
uses: manusa/actions-setup-minikube@b589f2d61bf96695c546929c72b38563e856059d # v2.14.0
3829
with:
39-
minikube version: 'v1.37.0'
30+
minikube version: 'v1.37.0' # renovate: datasource=github-releases depName=kubernetes/minikube
4031
kubernetes version: ${{ matrix.k8s }}
4132
driver: docker
4233
start args: '--addons=ingress --cni calico'
@@ -47,7 +38,7 @@ jobs:
4738
minikube status
4839
4940
- name: Load images from artifacts
50-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
41+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
5142
with:
5243
path: built-docker-image
5344
pattern: built-docker-image-*
@@ -68,12 +59,6 @@ jobs:
6859
helm dependency list ./helm/defectdojo
6960
helm dependency update ./helm/defectdojo
7061
71-
- name: Set confings into Outputs
72-
id: set
73-
run: |-
74-
echo "pgsql=${{ env.HELM_PG_DATABASE_SETTINGS }}" >> $GITHUB_ENV
75-
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
76-
7762
- name: Deploying Django application with ${{ matrix.databases }} ${{ matrix.brokers }}
7863
timeout-minutes: 15
7964
run: |-
@@ -84,10 +69,14 @@ jobs:
8469
defectdojo \
8570
./helm/defectdojo \
8671
--set django.ingress.enabled=true \
72+
--set images.django.image.tag=latest \
73+
--set images.nginx.image.tag=latest \
8774
--set imagePullPolicy=Never \
8875
--set initializer.keepSeconds="-1" \
89-
${{ env[matrix.databases] }} \
90-
${{ env[matrix.brokers] }} \
76+
--set valkey.enabled=true \
77+
--set createValkeySecret=true \
78+
--set postgresql.enabled=true \
79+
--set createPostgresqlSecret=true \
9180
--set createSecret=true
9281
9382
- name: Check deployment status

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: echo "GITHUB_ORG=${GITHUB_REPOSITORY%%/*}" >> $GITHUB_ENV
4141

4242
- name: Checkout from_branch branch
43-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4444
with:
4545
ref: ${{ inputs.from_branch }}
4646

@@ -58,7 +58,7 @@ jobs:
5858
run: git push origin HEAD:${NEW_BRANCH}
5959

6060
- name: Checkout release branch
61-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
61+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6262
with:
6363
ref: ${{ env.NEW_BRANCH }}
6464

@@ -98,7 +98,7 @@ jobs:
9898
chart-search-root: "helm/defectdojo"
9999

100100
- name: Push version changes
101-
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
101+
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
102102
with:
103103
commit_user_name: "${{ env.GIT_USERNAME }}"
104104
commit_user_email: "${{ env.GIT_EMAIL }}"

0 commit comments

Comments
 (0)