Skip to content

Commit 4cbb405

Browse files
authored
Merge branch 'dev' into master-into-dev/2.50.2-2.51.0-dev
2 parents 07fb8ab + 797bd24 commit 4cbb405

172 files changed

Lines changed: 4748 additions & 2179 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/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.11 compliant.
29+
- [ ] Your code is python 3.12 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/workflows/close-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Close stale issues and PRs
19-
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
19+
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
2020
with:
2121
# Disable automatic stale marking - only close manually labeled items
2222
days-before-stale: -1

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
extended: true
2020

2121
- name: Setup Node
22-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
22+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2323
with:
2424
node-version: '22.19.0'
2525

.github/workflows/k8s-tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ jobs:
108108
echo "INFO: status:"
109109
kubectl get pods
110110
echo "INFO: logs:"
111-
kubectl logs --selector=$3 --all-containers=true
111+
kubectl logs --selector=$3 --all-containers=true
112112
exit 1
113113
fi
114114
return ${?}
115115
}
116116
echo "Waiting for init job..."
117-
to_complete "condition=Complete" job "defectdojo.org/component=initializer"
117+
to_complete "condition=Complete" job "defectdojo.org/component=initializer"
118118
echo "Waiting for celery pods..."
119-
to_complete "condition=ready" pod "defectdojo.org/component=celery"
119+
to_complete "condition=ready" pod "defectdojo.org/component=celery"
120120
echo "Waiting for django pod..."
121-
to_complete "condition=ready" pod "defectdojo.org/component=django"
121+
to_complete "condition=ready" pod "defectdojo.org/component=django"
122122
echo "Pods up and ready to rumbole"
123123
kubectl get pods
124124
RETRY=0
@@ -132,15 +132,15 @@ jobs:
132132
--max-time 20 \
133133
--head \
134134
--header "Host: $DD_HOSTNAME" \
135-
http://$DJANGO_IP/login?next=/)
135+
"http://${DJANGO_IP}/login?next=/")
136136
echo $OUT
137-
CR=`echo $OUT | egrep "^HTTP" | cut -d' ' -f2`
137+
CR=$(echo $OUT | egrep "^HTTP" | cut -d' ' -f2)
138138
echo $CR
139139
if [[ $CR -ne 200 ]]; then
140140
echo $RETRY
141141
if [[ $RETRY -gt 2 ]]; then
142142
kubectl get pods
143-
echo `kubectl logs --tail=30 -l defectdojo.org/component=django -c uwsgi`
143+
echo $(kubectl logs --tail=30 -l defectdojo.org/component=django -c uwsgi)
144144
echo "ERROR: cannot display login screen; got HTTP code $CR"
145145
exit 1
146146
else
@@ -165,7 +165,7 @@ jobs:
165165
--data-raw "username=admin&password=$ADMIN_PASS" \
166166
--output /dev/null \
167167
--write-out "%{http_code}\n" \
168-
http://$DJANGO_IP/api/v2/api-token-auth/)
168+
"http://${DJANGO_IP}/api/v2/api-token-auth/")
169169
echo $CR
170170
if [[ $CR -ne 200 ]]; then
171171
echo "ERROR: login is not possible; got HTTP code $CR"
@@ -174,8 +174,8 @@ jobs:
174174
echo "Result received"
175175
fi
176176
echo "Final Check of components"
177-
errors=`kubectl get pods | grep Error | awk '{print $1}'`
178-
if [[ ! -z $errors ]]; then
177+
errors=$(kubectl get pods | grep Error | awk '{print $1}')
178+
if [[ ! -z $errors ]]; then
179179
echo "Few pods with errors"
180180
for line in $errors; do
181181
echo "Dumping log from $line"

.github/workflows/pr-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: "Autolabeler"
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
18+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1919
with:
2020
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2121
sync-labels: true

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ jobs:
8787
grep -H appVersion helm/defectdojo/Chart.yaml
8888
grep -H version helm/defectdojo/Chart.yaml
8989
90+
- name: Run helm-docs
91+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
92+
with:
93+
chart-search-root: "helm/defectdojo"
94+
9095
- name: Push version changes
9196
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
9297
with:
@@ -97,7 +102,7 @@ jobs:
97102
branch: ${{ env.NEW_BRANCH }}
98103

99104
- name: Create Pull Request
100-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
105+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
101106
with:
102107
github-token: ${{ secrets.GITHUB_TOKEN }}
103108
script: |

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
git add docs/content/en/open_source/upgrading/$minorv.md
7575
if: endsWith(inputs.release_number_new, '.0') && endsWith(inputs.release_number_dev, '.0-dev')
7676

77+
- name: Run helm-docs
78+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
79+
with:
80+
chart-search-root: "helm/defectdojo"
81+
7782
- name: Push version changes
7883
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
7984
with:
@@ -84,7 +89,7 @@ jobs:
8489
branch: ${{ env.NEW_BRANCH }}
8590

8691
- name: Create Pull Request
87-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
92+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
8893
with:
8994
github-token: ${{ secrets.GITHUB_TOKEN }}
9095
script: |
@@ -139,6 +144,11 @@ jobs:
139144
grep appVersion helm/defectdojo/Chart.yaml
140145
grep version components/package.json
141146
147+
- name: Run helm-docs
148+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
149+
with:
150+
chart-search-root: "helm/defectdojo"
151+
142152
- name: Push version changes
143153
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
144154
with:
@@ -149,7 +159,7 @@ jobs:
149159
branch: ${{ env.NEW_BRANCH }}
150160

151161
- name: Create Pull Request
152-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
162+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
153163
with:
154164
github-token: ${{ secrets.GITHUB_TOKEN }}
155165
script: |

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@ jobs:
6666

6767
- name: Configure HELM repos
6868
run: |-
69-
helm repo add bitnami https://charts.bitnami.com/bitnami
7069
helm dependency list ./helm/defectdojo
7170
helm dependency update ./helm/defectdojo
7271
7372
- name: Add yq
74-
uses: mikefarah/yq@f03c9dc599c37bfcaf533427211d05e51e6fee64 # v4.47.1
73+
uses: mikefarah/yq@6251e95af8df3505def48c71f3119836701495d6 # v4.47.2
7574

7675
- name: Pin version docker version
7776
id: pin_image
@@ -88,7 +87,7 @@ jobs:
8887
echo "chart_version=$(ls build | cut -d '-' -f 2,3 | sed 's|\.tgz||')" >> $GITHUB_ENV
8988
9089
- name: Create release ${{ inputs.release_number }}
91-
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
90+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
9291
with:
9392
name: '${{ inputs.release_number }} 🌈'
9493
tag_name: ${{ inputs.release_number }}

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

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
lint:
13-
name: Lint chart
13+
name: Lint chart (version)
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
@@ -22,13 +22,12 @@ jobs:
2222
- name: Set up Helm
2323
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
2424

25-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
25+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2626
with:
2727
python-version: 3.13
2828

2929
- name: Configure Helm repos
3030
run: |-
31-
helm repo add bitnami https://charts.bitnami.com/bitnami
3231
helm dependency list ./helm/defectdojo
3332
helm dependency update ./helm/defectdojo
3433
@@ -73,3 +72,75 @@ jobs:
7372
# - name: Run chart-testing (install)
7473
# run: ct install --config ct.yaml --target-branch ${{ env.ct-branch }} --helm-extra-args '--set createSecret=true --set createRabbitMqSecret=true --set createPostgresqlSecret=true --set timeout=900'
7574
# if: env.changed == 'true'
75+
76+
docs_generation:
77+
name: Update documentation
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Checkout
81+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
82+
83+
# Documentation provided in the README file needs to contain the latest information from `values.yaml` and all other related assets.
84+
# 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.
85+
# The helm-docs documentation will be generated for you.
86+
- name: Run helm-docs
87+
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2
88+
with:
89+
fail-on-diff: true
90+
chart-search-root: "helm/defectdojo"
91+
92+
generate_schema:
93+
name: Update schema
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
98+
99+
# The HELM structure supports the existence of a `values.schema.json` file. This file is used to validate all values provided by the user before Helm starts rendering templates.
100+
# The chart needs to have a `values.schema.json` file that is compatible with the default `values.yaml` file.
101+
# If this step fails, install https://github.com/losisin/helm-values-schema-json and run locally `helm schema --use-helm-docs` in `helm/defectdojo` before committing your changes.
102+
# The helm schema will be generated for you.
103+
- name: Generate values schema json
104+
uses: losisin/helm-values-schema-json-action@d5847286fa04322702c4f8d45031974798c83ac7 # v2.3.0
105+
with:
106+
fail-on-diff: true
107+
working-directory: "helm/defectdojo"
108+
useHelmDocs: true
109+
values: values.yaml
110+
111+
lint_format:
112+
name: Lint chart (format)
113+
runs-on: ubuntu-latest
114+
steps:
115+
- name: Checkout
116+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117+
with:
118+
persist-credentials: false
119+
fetch-depth: 0
120+
121+
- name: Set up Helm
122+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
123+
124+
- name: Configure Helm repos
125+
run: |-
126+
helm dependency list ./helm/defectdojo
127+
helm dependency update ./helm/defectdojo
128+
129+
- name: Lint
130+
run: |-
131+
helm lint ./helm/defectdojo --strict
132+
133+
artifacthub_linter:
134+
name: Artifacthub Lint
135+
runs-on: ubuntu-latest
136+
steps:
137+
- name: Checkout code
138+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
139+
- name: Run ah lint
140+
working-directory: ./helm/defectdojo
141+
run: |-
142+
docker run --rm \
143+
-v ${{ github.workspace }}/helm/defectdojo:/workspace \
144+
-w /workspace \
145+
artifacthub/ah:v1.21.0@sha256:511818fa90ce87d7132c6214e51ea6dd62eea030f5d2271ce073f948b3060972 \
146+
ah lint

.github/workflows/validate_docs_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
extended: true
1717

1818
- name: Setup Node
19-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
19+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2020
with:
2121
node-version: '22.19.0'
2222

0 commit comments

Comments
 (0)