Skip to content

Commit 46f514a

Browse files
authored
Merge branch 'dev' into master-into-dev/2.43.4-2.44.0-dev
2 parents b3097a7 + 12e0120 commit 46f514a

File tree

255 files changed

+2343
-2309
lines changed

Some content is hidden

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

255 files changed

+2343
-2309
lines changed

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,8 @@ localization:
6060
- any-glob-to-any-file:
6161
- dojo/locale/*
6262
- dojo/locale/**/*
63+
64+
lint:
65+
- changed-files:
66+
- any-glob-to-any-file:
67+
- ruff.toml

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ categories:
4141
label: 'ui'
4242
- title: '🗣 Updates in localization'
4343
label: 'localization'
44+
- title: '🔧 Improved code quality with linters'
45+
label: 'lint'
4446
- title: '🧰 Maintenance'
4547
collapse-after: 3
4648
labels:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
run: echo "IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2929

3030
- name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
31+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
3232
with:
3333
buildkitd-flags: --debug
3434
driver-opts: image=moby/buildkit:master # needed to get the fix for https://github.com/moby/buildkit/issues/2426
3535

3636
- name: Build
3737
id: docker_build
38-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
38+
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
3939
timeout-minutes: 10
4040
env:
4141
DOCKER_BUILD_CHECKS_ANNOTATIONS: false

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
node-version: '22.5.1'
2525

2626
- name: Cache dependencies
27-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
27+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
2828
with:
2929
path: ~/.npm
3030
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

.github/workflows/k8s-tests.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
./helm/defectdojo \
8686
--set django.ingress.enabled=true \
8787
--set imagePullPolicy=Never \
88+
--set initializer.keepSeconds="-1" \
8889
${{ env[matrix.databases] }} \
8990
${{ env[matrix.brokers] }} \
9091
--set createSecret=true \
@@ -124,10 +125,15 @@ jobs:
124125
RETRY=0
125126
while :
126127
do
128+
DJANGO_IP=$(kubectl get svc defectdojo-django -o jsonpath='{.spec.clusterIP}')
127129
OUT=$(kubectl run curl --quiet=true --image=curlimages/curl:7.73.0 \
128130
--overrides='{ "apiVersion": "v1" }' \
129-
--restart=Never -i --rm -- -s -m 20 -I --header "Host: $DD_HOSTNAME" http://`kubectl get service defectdojo-django -o json \
130-
| jq -r '.spec.clusterIP'`/login?next=/)
131+
--restart=Never -i --rm -- \
132+
--silent \
133+
--max-time 20 \
134+
--head \
135+
--header "Host: $DD_HOSTNAME" \
136+
http://$DJANGO_IP/login?next=/)
131137
echo $OUT
132138
CR=`echo $OUT | egrep "^HTTP" | cut -d' ' -f2`
133139
echo $CR
@@ -148,6 +154,26 @@ jobs:
148154
break
149155
fi
150156
done
157+
ADMIN_PASS=$(kubectl get secret/defectdojo -o jsonpath='{.data.DD_ADMIN_PASSWORD}' | base64 -d)
158+
echo "Simple API check"
159+
DJANGO_IP=$(kubectl get svc defectdojo-django -o jsonpath='{.spec.clusterIP}')
160+
CR=$(kubectl run curl --quiet=true --image=curlimages/curl:7.73.0 \
161+
--overrides='{ "apiVersion": "v1" }' \
162+
--restart=Never -i --rm -- \
163+
--silent \
164+
--max-time 20 \
165+
--header "Host: $DD_HOSTNAME" \
166+
--data-raw "username=admin&password=$ADMIN_PASS" \
167+
--output /dev/null \
168+
--write-out "%{http_code}\n" \
169+
http://$DJANGO_IP/api/v2/api-token-auth/)
170+
echo $CR
171+
if [[ $CR -ne 200 ]]; then
172+
echo "ERROR: login is not possible; got HTTP code $CR"
173+
exit 1
174+
else
175+
echo "Result received"
176+
fi
151177
echo "Final Check of components"
152178
errors=`kubectl get pods | grep Error | awk '{print $1}'`
153179
if [[ ! -z $errors ]]; then

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

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

4848
- name: Set up Docker Buildx
4949
id: buildx
50-
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
50+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
5151

5252
- name: Build and push images with debian
5353
if: ${{ matrix.os == 'debian' }}
54-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
54+
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
5555
env:
5656
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
5757
REPO_ORG: ${{ env.repoorg }}
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Build and push images with alpine
6666
if: ${{ matrix.os == 'alpine' }}
67-
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
67+
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
6868
env:
6969
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
7070
REPO_ORG: ${{ env.repoorg }}

.github/workflows/release-x-manual-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
git config --global user.email "${{ env.GIT_EMAIL }}"
4848
4949
- name: Set up Helm
50-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
50+
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
5151

5252
- name: Configure HELM repos
5353
run: |-

.github/workflows/test-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fetch-depth: 0
2121

2222
- name: Set up Helm
23-
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
23+
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
2424

2525
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2626
with:

.github/workflows/update-sample-data.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
# Checkout the repository
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2020
with:
2121
ref: ${{ github.ref_name || 'dev'}}
2222

@@ -43,7 +43,7 @@ jobs:
4343
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
4444
4545
- name: Create Pull Request
46-
uses: peter-evans/create-pull-request@v5
46+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
4747
with:
4848
token: ${{ secrets.GITHUB_TOKEN }}
4949
commit-message: "Update sample data"

Dockerfile.django-alpine

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Dockerfile.nginx to use the caching mechanism of Docker.
66

77
# Ref: https://devguide.python.org/#branchstatus
8-
FROM python:3.11.9-alpine3.20@sha256:df44c0c0761ddbd6388f4549cab42d24d64d257c2a960ad5b276bb7dab9639c7 AS base
8+
FROM python:3.11.9-alpine3.20@sha256:f9ce6fe33d9a5499e35c976df16d24ae80f6ef0a28be5433140236c2ca482686 AS base
99
FROM base AS build
1010
WORKDIR /app
1111
RUN \
@@ -31,7 +31,7 @@ COPY requirements.txt ./
3131
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
3232
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3333

34-
FROM base AS django-alpine
34+
FROM base AS django
3535
WORKDIR /app
3636
ARG uid=1001
3737
ARG gid=1337
@@ -135,5 +135,5 @@ ENV \
135135
DD_UWSGI_NUM_OF_THREADS="2"
136136
ENTRYPOINT ["/entrypoint-uwsgi.sh"]
137137

138-
FROM django-alpine AS django-unittests
138+
FROM django AS django-unittests
139139
COPY unittests/ ./unittests/

0 commit comments

Comments
 (0)