Skip to content

Commit 617afa6

Browse files
authored
Merge branch 'dev' into feature/dry-run-reimport
2 parents 23a9b49 + d303fea commit 617afa6

File tree

62 files changed

+2185
-248
lines changed

Some content is hidden

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

62 files changed

+2185
-248
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Node
2222
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2323
with:
24-
node-version: '24.10.0' # TODO: Renovate helper might not be needed here - needs to be fully tested
24+
node-version: '24.11.0' # TODO: Renovate helper might not be needed here - needs to be fully tested
2525

2626
- name: Cache dependencies
2727
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0

.github/workflows/helm-docs-updates.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/renovate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
uses: suzuki-shunsuke/github-action-renovate-config-validator@c22827f47f4f4a5364bdba19e1fe36907ef1318e # v1.1.1
2222
with:
2323
strict: "true"
24-
validator_version: 41.163.6 # renovate: datasource=github-releases depName=renovatebot/renovate
24+
validator_version: 41.170.0 # renovate: datasource=github-releases depName=renovatebot/renovate

.github/workflows/shellcheck.yml

Lines changed: 7 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -2,124 +2,17 @@
22
name: Shellcheck
33
on:
44
pull_request:
5-
env:
6-
SHELLCHECK_REPO: 'koalaman/shellcheck'
7-
SHELLCHECK_VERSION: 'v0.9.0' # renovate: datasource=github-releases depName=koalaman/shellcheck
8-
SHELLCHECK_SHA: '038fd81de6b7e20cc651571362683853670cdc71' # Renovate config is not currently adjusted to update hash - it needs to be done manually for now
5+
96
jobs:
107
shellcheck:
118
runs-on: ubuntu-latest
129
steps:
1310
- name: Checkout
1411
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1512

16-
- name: Grab shellcheck
17-
run: |
18-
set -e
19-
20-
SHELLCHECK_TARBALL_URL="https://github.com/${SHELLCHECK_REPO}/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
21-
SHELLCHECK_TARBALL_LOC="shellcheck.tar.xz"
22-
curl -L "${SHELLCHECK_TARBALL_URL}" -o "${SHELLCHECK_TARBALL_LOC}"
23-
tarball_sha=$(shasum ${SHELLCHECK_TARBALL_LOC} | awk '{print $1}')
24-
if [ "${tarball_sha}" != "${SHELLCHECK_SHA}" ]; then
25-
echo "Got invalid SHA for shellcheck: ${tarball_sha}"
26-
exit 1
27-
fi
28-
tar -xvf "${SHELLCHECK_TARBALL_LOC}"
29-
cd "shellcheck-${SHELLCHECK_VERSION}" || exit 1
30-
mv shellcheck "${GITHUB_WORKSPACE}/shellcheck"
31-
32-
- name: Run shellcheck
33-
shell: bash
34-
run: |
35-
set -o pipefail
36-
37-
# Make sure we already put the proper shellcheck binary in place
38-
if [ ! -f "./shellcheck" ]; then
39-
echo "shellcheck not found"
40-
exit 1
41-
fi
42-
43-
# Make sure we know what to compare the PR's changes against
44-
if [ -z "${GITHUB_BASE_REF}" ]; then
45-
echo "No base reference supplied"
46-
exit 1
47-
fi
48-
49-
num_findings=0
50-
51-
# Execute shellcheck and add errors based on the output
52-
run_shellcheck() {
53-
local modified_shell_script="${1}"
54-
local findings_file="findings.txt"
55-
56-
# Remove leftover findings file from previous iterations
57-
if [ -f "${findings_file}" ]; then
58-
rm "${findings_file}"
59-
fi
60-
61-
echo "Running shellcheck against ${modified_shell_script}..."
62-
63-
# If shellcheck reported no errors (exited with 0 status code), return
64-
if ./shellcheck -f json -S warning "${modified_shell_script}" | jq -c '.[]' > "${findings_file}"; then
65-
return 0
66-
fi
67-
68-
# Walk each of the individual findings
69-
while IFS= read -r finding; do
70-
num_findings=$((num_findings+1))
71-
72-
line=$(echo "${finding}" | jq '.line')
73-
end_line=$(echo "${finding}" | jq '.endLine')
74-
column=$(echo "${finding}" | jq '.column')
75-
end_column=$(echo "${finding}" | jq '.endColumn')
76-
code=$(echo "${finding}" | jq '.code')
77-
title="SC${code}"
78-
message="$(echo "${finding}" | jq -r '.message') See https://github.com/koalaman/shellcheck/wiki/${title}"
79-
80-
echo "Line: ${line}"
81-
echo "End line: ${end_line}"
82-
echo "Column: ${column}"
83-
echo "End column: ${end_column}"
84-
echo "Title: ${title}"
85-
echo "Message: ${message}"
86-
87-
# Raise an error with the file/line/etc
88-
echo "::error file=${modified_shell_script},line=${line},endLine=${end_line},column=${column},endColumn=${end_column},title=${title}::${message}"
89-
done < ${findings_file}
90-
}
91-
92-
# Find the shell scripts that were created or modified by this PR
93-
find_modified_shell_scripts() {
94-
shell_scripts="shell_scripts.txt"
95-
modified_files="modified_files.txt"
96-
modified_shell_scripts="modified_shell_scripts.txt"
97-
98-
find . -name "*.sh" -or -name "*.bash" | sed 's#^\./##' > "${shell_scripts}"
99-
git diff --name-only "origin/${GITHUB_BASE_REF}" HEAD > "${modified_files}"
100-
101-
if [ ! -s "${shell_scripts}" ] || [ ! -s "${modified_files}" ]; then
102-
echo "No modified shell scripts detected"
103-
exit 0
104-
fi
105-
106-
if ! grep -Fxf "${shell_scripts}" "${modified_files}" > "${modified_shell_scripts}"; then
107-
echo "No modified shell scripts detected"
108-
exit 0
109-
fi
110-
}
111-
112-
git fetch origin "${GITHUB_BASE_REF}" || exit 1
113-
114-
find_modified_shell_scripts
115-
116-
# Loop through the modified shell scripts
117-
while IFS= read -r modified_shell_script; do
118-
run_shellcheck "${modified_shell_script}"
119-
done < ${modified_shell_scripts}
120-
121-
# If shellcheck reported any findings, fail the workflow
122-
if [ ${num_findings} -gt 0 ]; then
123-
echo "shellcheck reported ${num_findings} findings."
124-
exit 1
125-
fi
13+
- name: Run ShellCheck
14+
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
15+
with:
16+
version: 'v0.11.0' # renovate: datasource=github-releases depName=koalaman/shellcheck versioning=loose
17+
env:
18+
SHELLCHECK_OPTS: -e SC1091 -e SC2086 # TODO: fix following findings

.github/workflows/slack-pr-reminder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: github.repository == 'DefectDojo/django-DefectDojo' # Notify only in core repo, not in forks - it would just fail in fork
1212
steps:
1313
- name: Notify reviewers in Slack
14-
uses: DefectDojo-Inc/notify-pr-reviewers-action@be26734e06338b41be6e70ce96027a51aa9ba9c6 # master
14+
uses: DefectDojo-Inc/notify-pr-reviewers-action@master # Do not use a specific version to always get the latest updates
1515
with:
1616
owner: "DefectDojo"
1717
repository: "django-DefectDojo"

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,25 @@ jobs:
107107
steps:
108108
- name: Checkout
109109
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
110-
110+
111+
- name: Update values in HELM chart
112+
if: startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'dependabot/')
113+
run: |
114+
yq -i '.annotations."artifacthub.io/changes" += "- kind: changed\n description: ${{ github.event.pull_request.title }}\n"' helm/defectdojo/Chart.yaml
115+
116+
- name: Run helm-docs (update)
117+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
118+
if: startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'dependabot/')
119+
with:
120+
chart-search-root: "helm/defectdojo"
121+
git-push: true
122+
111123
# Documentation provided in the README file needs to contain the latest information from `values.yaml` and all other related assets.
112124
# If this step fails, install https://github.com/norwoodj/helm-docs and run locally `helm-docs --chart-search-root helm/defectdojo` before committing your changes.
113125
# The helm-docs documentation will be generated for you.
114-
- name: Run helm-docs
126+
- name: Run helm-docs (check)
115127
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
128+
if: ! startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'dependabot/')
116129
with:
117130
fail-on-diff: true
118131
chart-search-root: "helm/defectdojo"

.github/workflows/validate_docs_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node
1919
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2020
with:
21-
node-version: '24.10.0' # TODO: Renovate helper might not be needed here - needs to be fully tested
21+
node-version: '24.11.0' # TODO: Renovate helper might not be needed here - needs to be fully tested
2222

2323
- name: Cache dependencies
2424
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0

Dockerfile.integration-tests-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# code: language=Dockerfile
33

4-
FROM openapitools/openapi-generator-cli:v7.16.0@sha256:e56372add5e038753fb91aa1bbb470724ef58382fdfc35082bf1b3e079ce353c AS openapitools
4+
FROM openapitools/openapi-generator-cli:v7.17.0@sha256:868b97eb4e5080d2cdfd5b3eeaa4d52e4bbb7c56f14e234b08b0b0bc4f38a78f AS openapitools
55
# currently only supports x64, no arm yet due to chrome and selenium dependencies
66
FROM python:3.13.7-slim-trixie@sha256:5f55cdf0c5d9dc1a415637a5ccc4a9e18663ad203673173b8cda8f8dcacef689 AS build
77
WORKDIR /app

Dockerfile.nginx-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ COPY dojo/ ./dojo/
6363
# always collect static for debug toolbar as we can't make it dependant on env variables or build arguments without breaking docker layer caching
6464
RUN env DD_SECRET_KEY='.' DD_DJANGO_DEBUG_TOOLBAR_ENABLED=True python3 manage.py collectstatic --noinput --verbosity=2 && true
6565

66-
FROM nginx:1.29.2-alpine3.22@sha256:61e01287e546aac28a3f56839c136b31f590273f3b41187a36f46f6a03bbfe22
66+
FROM nginx:1.29.3-alpine3.22@sha256:b3c656d55d7ad751196f21b7fd2e8d4da9cb430e32f646adcf92441b72f82b14
6767
ARG uid=1001
6868
ARG appuser=defectdojo
6969
COPY --from=collectstatic /app/static/ /usr/share/nginx/html/static/

0 commit comments

Comments
 (0)