Skip to content

Commit 147480e

Browse files
authored
Merge branch 'dev' into fix/github-sast-dedup
2 parents 05b0636 + 19f7044 commit 147480e

324 files changed

Lines changed: 181924 additions & 179894 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.

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Normalize line endings to LF
2+
*.sh text eol=lf
3+
*.expect text eol=lf
4+
*.py text eol=lf
5+
*.yml text eol=lf
6+
*.yaml text eol=lf
7+
*.md text eol=lf
8+
9+
# Binary files — never touch line endings
10+
*.png binary
11+
*.jpg binary
12+
*.gif binary
13+
*.ico binary
14+
*.pdf binary

.github/dependabot.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ updates:
33
- package-ecosystem: pip
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: weekly
7+
day: wednesday
8+
time: "08:00"
79
open-pull-requests-limit: 10
810
target-branch: dev
911
ignore:
@@ -16,7 +18,9 @@ updates:
1618
- package-ecosystem: npm
1719
directory: "/components"
1820
schedule:
19-
interval: daily
21+
interval: weekly
22+
day: wednesday
23+
time: "08:00"
2024
open-pull-requests-limit: 10
2125
target-branch: dev
2226
ignore:

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This checklist is for your information.
2525
- [ ] Features/Changes should be submitted against the `dev`.
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.
28-
- [ ] Your code is flake8 compliant.
28+
- [ ] Your code is Ruff compliant (see [ruff.toml](../ruff.toml)).
2929
- [ ] 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.

.github/renovate.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"extends": [
3-
"config:recommended"
3+
"config:recommended",
4+
"schedule:weekly"
45
],
6+
"schedule": ["* * * * 3"],
57
"dependencyDashboard": true,
68
"dependencyDashboardApproval": false,
79
"baseBranchPatterns": ["dev"],
@@ -16,7 +18,7 @@
1618
"dojo/components/yarn.lock",
1719
"dojo/components/package.json"
1820
],
19-
"ignoreDeps": [],
21+
"ignoreDeps": ["gohugoio/hugo"],
2022
"packageRules": [{
2123
"matchPackageNames": ["*"],
2224
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{newVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",

.github/workflows/cancel-outdated-workflow-runs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
steps:
1616
- uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
1717
with:
18-
workflow_id: 'integration-tests.yml,k8s-testing.yml,unit-tests.yml'
18+
workflow_id: 'integration-tests.yml,k8s-tests.yml,unit-tests.yml,validate_docs_build.yml,test-helm-chart.yml,ruff.yml,shellcheck.yml'
1919
access_token: ${{ github.token }}

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ jobs:
1818
- name: Setup Hugo
1919
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
2020
with:
21-
hugo-version: '0.153.4' # renovate: datasource=github-releases depName=gohugoio/hugo
21+
hugo-version: '0.153.4'
2222
extended: true
2323

2424
- name: Setup Node
2525
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2626
with:
27-
node-version: '24.14.0' # TODO: Renovate helper might not be needed here - needs to be fully tested
27+
node-version: '24.14.1' # TODO: Renovate helper might not be needed here - needs to be fully tested
2828

2929
- name: Cache dependencies
30-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
30+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
3131
with:
3232
path: ~/.npm
3333
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Setup Pages
4444
id: pages
45-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
45+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
4646

4747
- name: Install dependencies
4848
run: cd docs && npm ci

.github/workflows/k8s-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
# databases, broker and k8s are independent, so we don't need to test each combination
1717
# lastest k8s version (https://kubernetes.io/releases/) and the oldest officially supported version
1818
# are tested (https://kubernetes.io/releases/)
19-
- k8s: 'v1.35.2' # renovate: datasource=github-releases depName=kubernetes/kubernetes versioning=loose
19+
- k8s: 'v1.35.3' # renovate: datasource=github-releases depName=kubernetes/kubernetes versioning=loose
2020
os: debian
21-
- k8s: '1.33.9' # renovate: datasource=custom.endoflife-oldest-maintained depName=kubernetes
21+
- k8s: '1.33.10' # renovate: datasource=custom.endoflife-oldest-maintained depName=kubernetes
2222
os: debian
2323
steps:
2424
- name: Checkout
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Performance Tests
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
performance-tests:
8+
name: Performance Tests
9+
runs-on: ubuntu-latest
10+
needs: []
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
18+
- name: Set-platform
19+
run: |
20+
echo "PLATFORM=linux-amd64" >> $GITHUB_ENV
21+
22+
- name: Load images from artifacts
23+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
24+
with:
25+
path: built-docker-image
26+
pattern: built-docker-image-django-alpine-linux-amd64
27+
merge-multiple: true
28+
29+
- name: Load docker images
30+
timeout-minutes: 10
31+
run: |
32+
docker load -i built-docker-image/django-alpine-linux-amd64_img
33+
docker images
34+
35+
- name: Set unit-test mode
36+
run: docker/setEnv.sh unit_tests_cicd
37+
38+
- name: Start Postgres and webhook.endpoint
39+
run: docker compose up --no-deps -d postgres webhook.endpoint
40+
41+
- name: Start uwsgi (idle)
42+
timeout-minutes: 5
43+
run: |
44+
docker compose -f docker-compose.yml -f docker-compose.override.unit_tests_cicd.yml \
45+
-f docker/docker-compose.override.performance_tests_cicd.yml \
46+
up -d --no-deps uwsgi
47+
env:
48+
DJANGO_VERSION: alpine
49+
50+
- name: Run performance tests (auto-update counts)
51+
timeout-minutes: 15
52+
run: python3 scripts/update_performance_test_counts.py
53+
54+
- name: Check counts are up to date
55+
run: |
56+
if ! git diff --quiet unittests/test_importers_performance.py; then
57+
echo "Performance test counts are out of date. Fix them by running locally:"
58+
echo ""
59+
echo " python3 scripts/update_performance_test_counts.py"
60+
echo ""
61+
echo "Diff:"
62+
git diff unittests/test_importers_performance.py
63+
exit 1
64+
else
65+
echo "Performance test counts are up to date."
66+
fi
67+
68+
- name: Logs
69+
if: failure()
70+
run: docker compose logs --tail="2500" uwsgi
71+
72+
- name: Shutdown
73+
if: always()
74+
run: docker compose down

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
grep -H version helm/defectdojo/Chart.yaml
9494
9595
- name: Run helm-docs
96-
uses: losisin/helm-docs-github-action@6f957579ac122ecc167bf515fe84e828686c9a15 # v1.7.1
96+
uses: losisin/helm-docs-github-action@2ccf3e77eb70dc80d62f8cc26f15d0a96b75fef4 # v1.8.0
9797
with:
9898
chart-search-root: "helm/defectdojo"
9999

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
yq -i '.annotations."artifacthub.io/changes" = ""' helm/defectdojo/Chart.yaml
8282
8383
- name: Run helm-docs
84-
uses: losisin/helm-docs-github-action@6f957579ac122ecc167bf515fe84e828686c9a15 # v1.7.1
84+
uses: losisin/helm-docs-github-action@2ccf3e77eb70dc80d62f8cc26f15d0a96b75fef4 # v1.8.0
8585
with:
8686
chart-search-root: "helm/defectdojo"
8787

@@ -157,7 +157,7 @@ jobs:
157157
yq -i '.annotations."artifacthub.io/changes" = ""' helm/defectdojo/Chart.yaml
158158
159159
- name: Run helm-docs
160-
uses: losisin/helm-docs-github-action@6f957579ac122ecc167bf515fe84e828686c9a15 # v1.7.1
160+
uses: losisin/helm-docs-github-action@2ccf3e77eb70dc80d62f8cc26f15d0a96b75fef4 # v1.8.0
161161
with:
162162
chart-search-root: "helm/defectdojo"
163163

0 commit comments

Comments
 (0)