Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
biennd4 committed Sep 14, 2024
2 parents 3c1128e + 330462d commit 52c569f
Show file tree
Hide file tree
Showing 348 changed files with 9,792 additions and 1,461 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-docker-images-for-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
id: docker_build
uses: docker/build-push-action@v6
timeout-minutes: 10
env:
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
with:
context: .
push: false
Expand All @@ -53,4 +55,4 @@ jobs:
with:
name: ${{ matrix.docker-image }}
path: ${{ matrix.docker-image }}-${{ matrix.os }}_img
retention-days: 1
retention-days: 1
16 changes: 9 additions & 7 deletions .github/workflows/k8s-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,28 @@ jobs:
echo "pgsql=${{ env.HELM_PG_DATABASE_SETTINGS }}" >> $GITHUB_ENV
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
- name: Deploying Djano application with ${{ matrix.databases }} ${{ matrix.brokers }}
timeout-minutes: 10
- name: Deploying Django application with ${{ matrix.databases }} ${{ matrix.brokers }}
timeout-minutes: 15
run: |-
helm install \
--timeout 800s \
--wait \
--wait-for-jobs \
defectdojo \
./helm/defectdojo \
--set django.ingress.enabled=true \
--set imagePullPolicy=Never \
${{ env[matrix.databases] }} \
${{ env[matrix.brokers] }} \
--set createSecret=true \
--set tag=${{ matrix.os }} \
# --set imagePullSecrets=defectdojoregistrykey
--set tag=${{ matrix.os }}
- name: Check deployment status
if: always()
run: |-
kubectl get pods
kubectl get ingress
kubectl get services
kubectl get all,ingress # all = pods, services, deployments, replicasets, statefulsets, jobs
helm status defectdojo
helm history defectdojo
- name: Check Application
timeout-minutes: 10
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-x-manual-docker-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
if: ${{ matrix.os == 'debian' }}
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
REPO_ORG: ${{ env.repoorg }}
docker-image: ${{ matrix.docker-image }}
with:
Expand All @@ -79,6 +80,7 @@ jobs:
if: ${{ matrix.os == 'alpine' }}
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
REPO_ORG: ${{ env.repoorg }}
docker-image: ${{ matrix.docker-image }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
run: docker/setEnv.sh unit_tests_cicd

# phased startup so we can use the exit code from unit test container
- name: Start Postgres
run: docker compose up -d postgres
- name: Start Postgres and webhook.endpoint
run: docker compose up -d postgres webhook.endpoint

# no celery or initializer needed for unit tests
- name: Unit tests
Expand Down
15 changes: 12 additions & 3 deletions Dockerfile.integration-tests-debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# code: language=Dockerfile

FROM openapitools/openapi-generator-cli:v7.7.0@sha256:99924315933d49e7b33a7d2074bb2b64fc8def8f74519939036e24eb48f00336 AS openapitools
FROM openapitools/openapi-generator-cli:v7.8.0@sha256:c409bfa9b276faf27726d2884b859d18269bf980cb63546e80b72f3b2648c492 AS openapitools
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e AS build
WORKDIR /app
RUN \
Expand All @@ -25,8 +25,13 @@ RUN pip install --no-cache-dir selenium==4.9.0 requests

# Install the latest Google Chrome stable release
WORKDIR /opt/chrome

# TODO: figure out whatever fix is necessary to use Chrome >= 128 and put this back in the RUN below so we stay
# up-to-date
# chrome_url=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels[] | select(.channel == "Stable") | .downloads.chrome[] | select(.platform == "linux64").url') && \

RUN \
chrome_url=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels[] | select(.channel == "Stable") | .downloads.chrome[] | select(.platform == "linux64").url') && \
chrome_url="https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.119/linux64/chrome-linux64.zip" && \
wget $chrome_url && \
unzip chrome-linux64.zip && \
rm -rf chrome-linux64.zip && \
Expand All @@ -49,8 +54,12 @@ RUN apt-get install -y libxi6 libgconf-2-4 jq libjq1 libonig5 libxkbcommon0 libx

# Installing the latest stable Google Chrome driver release
WORKDIR /opt/chrome-driver
# TODO: figure out whatever fix is necessary to use Chrome >= 128 and put this back in the RUN below so we stay
# up-to-date
# chromedriver_url=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels[] | select(.channel == "Stable") | .downloads.chromedriver[] | select(.platform == "linux64").url') && \

RUN \
chromedriver_url=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels[] | select(.channel == "Stable") | .downloads.chromedriver[] | select(.platform == "linux64").url') && \
chromedriver_url="https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.119/linux64/chromedriver-linux64.zip" && \
wget $chromedriver_url && \
unzip -j chromedriver-linux64.zip chromedriver-linux64/chromedriver && \
rm -rf chromedriver-linux64.zip && \
Expand Down
4 changes: 2 additions & 2 deletions components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "defectdojo",
"version": "2.38.0-dev",
"version": "2.39.0-dev",
"license" : "BSD-3-Clause",
"private": true,
"dependencies": {
Expand All @@ -26,7 +26,7 @@
"google-code-prettify": "^1.0.0",
"jquery": "^3.7.1",
"jquery-highlight": "3.5.0",
"jquery-ui": "1.13.3",
"jquery-ui": "1.14.0",
"jquery.cookie": "1.4.1",
"jquery.flot.tooltip": "^0.9.0",
"jquery.hotkeys": "jeresig/jquery.hotkeys#master",
Expand Down
12 changes: 6 additions & 6 deletions components/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,12 @@ [email protected]:
dependencies:
jquery ">= 1.0.0"

jquery-ui@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.13.3.tgz#d9f5292b2857fa1f2fdbbe8f2e66081664eb9bc5"
integrity sha512-D2YJfswSJRh/B8M/zCowDpNFfwsDmtfnMPwjJTyvl+CBqzpYwQ+gFYIbUUlzijy/Qvoy30H1YhoSui4MNYpRwA==
jquery-ui@1.14.0:
version "1.14.0"
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.14.0.tgz#b75d417826f0bab38125f907356d2e3313a9c6d5"
integrity sha512-mPfYKBoRCf0MzaT2cyW5i3IuZ7PfTITaasO5OFLAQxrHuI+ZxruPa+4/K1OMNT8oElLWGtIxc9aRbyw20BKr8g==
dependencies:
jquery ">=1.8.0 <4.0.0"
jquery ">=1.12.0 <5.0.0"

[email protected]:
version "1.4.1"
Expand All @@ -699,7 +699,7 @@ jquery.hotkeys@jeresig/jquery.hotkeys#master:
version "0.2.0"
resolved "https://codeload.github.com/jeresig/jquery.hotkeys/tar.gz/f24f1da275aab7881ab501055c256add6f690de4"

"jquery@>= 1.0.0", jquery@>=1.7, jquery@>=1.7.0, "jquery@>=1.8.0 <4.0.0", jquery@^3.7.1:
"jquery@>= 1.0.0", "jquery@>=1.12.0 <5.0.0", jquery@>=1.7, jquery@>=1.7.0, jquery@^3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
Expand Down
60 changes: 0 additions & 60 deletions docker-compose.override.debug.yml

This file was deleted.

14 changes: 10 additions & 4 deletions docker-compose.override.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,30 @@ services:
volumes:
- '.:/app:z'
environment:
PYTHONWARNINGS: always # We are strict during development so Warnings needs to be more verbose
PYTHONWARNINGS: error # We are strict about Warnings during development
DD_DEBUG: 'True'
DD_ADMIN_USER: "${DD_ADMIN_USER:-admin}"
DD_ADMIN_PASSWORD: "${DD_ADMIN_PASSWORD:-admin}"
DD_EMAIL_URL: "smtp://mailhog:1025"
celeryworker:
volumes:
- '.:/app:z'
environment:
PYTHONWARNINGS: always # We are strict during development so Warnings needs to be more verbose
PYTHONWARNINGS: error # We are strict about Warnings during development
DD_DEBUG: 'True'
DD_EMAIL_URL: "smtp://mailhog:1025"
celerybeat:
volumes:
- '.:/app:z'
environment:
PYTHONWARNINGS: always # We are strict during development so Warnings needs to be more verbose
PYTHONWARNINGS: error # We are strict about Warnings during development
DD_DEBUG: 'True'
initializer:
volumes:
- '.:/app:z'
environment:
PYTHONWARNINGS: always # We are strict during development so Warnings needs to be more verbose
PYTHONWARNINGS: error # We are strict about Warnings during development
DD_DEBUG: 'True'
DD_ADMIN_USER: "${DD_ADMIN_USER:-admin}"
DD_ADMIN_PASSWORD: "${DD_ADMIN_PASSWORD:-admin}"
nginx:
Expand All @@ -49,3 +53,5 @@ services:
published: 8025
protocol: tcp
mode: host
"webhook.endpoint":
image: mccutchen/go-httpbin:v2.14.0@sha256:e0f398a0a29e7cf00a2467326344d70b4d89d0786d8f9a3287c2a0371c804823
2 changes: 2 additions & 0 deletions docker-compose.override.unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ services:
redis:
image: busybox:1.36.1-musl
entrypoint: ['echo', 'skipping', 'redis']
"webhook.endpoint":
image: mccutchen/go-httpbin:v2.14.0@sha256:e0f398a0a29e7cf00a2467326344d70b4d89d0786d8f9a3287c2a0371c804823
volumes:
defectdojo_postgres_unit_tests: {}
defectdojo_media_unit_tests: {}
2 changes: 2 additions & 0 deletions docker-compose.override.unit_tests_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ services:
redis:
image: busybox:1.36.1-musl
entrypoint: ['echo', 'skipping', 'redis']
"webhook.endpoint":
image: mccutchen/go-httpbin:v2.14.0@sha256:e0f398a0a29e7cf00a2467326344d70b4d89d0786d8f9a3287c2a0371c804823
volumes:
defectdojo_postgres_unit_tests: {}
defectdojo_media_unit_tests: {}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ services:
source: ./docker/extra_settings
target: /app/docker/extra_settings
postgres:
image: postgres:16.4-alpine@sha256:492898505cb45f9835acc327e98711eaa9298ed804e0bb36f29e08394229550d
image: postgres:16.4-alpine@sha256:d898b0b78a2627cb4ee63464a14efc9d296884f1b28c841b0ab7d7c42f1fffdf
environment:
POSTGRES_DB: ${DD_DATABASE_NAME:-defectdojo}
POSTGRES_USER: ${DD_DATABASE_USER:-defectdojo}
POSTGRES_PASSWORD: ${DD_DATABASE_PASSWORD:-defectdojo}
volumes:
- defectdojo_postgres:/var/lib/postgresql/data
redis:
image: redis:7.2.5-alpine@sha256:0bc09d9f486508aa42ecc2f18012bb1e3a1b2744ef3a6ad30942fa12579f0b03
image: redis:7.2.5-alpine@sha256:6aaf3f5e6bc8a592fbfe2cccf19eb36d27c39d12dab4f4b01556b7449e7b1f44
volumes:
- defectdojo_redis:/data
volumes:
Expand Down
4 changes: 2 additions & 2 deletions docker/install_chrome_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def find_packages(library_name):


def run_command(cmd, cwd=None, env=None):
result = subprocess.run(cmd, cwd=cwd, env=env, capture_output=True, text=True)
result = subprocess.run(cmd, cwd=cwd, env=env, capture_output=True, text=True, check=False)
return result.stdout


Expand All @@ -27,7 +27,7 @@ def ldd(file_path):
# For simplicity, I'm assuming if we get an error, the code is non-zero.
try:
result = subprocess.run(
["ldd", file_path], capture_output=True, text=True,
["ldd", file_path], capture_output=True, text=True, check=False,
)
stdout = result.stdout
code = result.returncode
Expand Down
14 changes: 0 additions & 14 deletions docker/setEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
target_dir="${0%/*}/.."
override_link='docker-compose.override.yml'
override_file_dev='docker-compose.override.dev.yml'
override_file_debug='docker-compose.override.debug.yml'
override_file_unit_tests='docker-compose.override.unit_tests.yml'
override_file_unit_tests_cicd='docker-compose.override.unit_tests_cicd.yml'
override_file_integration_tests='docker-compose.override.integration_tests.yml'
Expand Down Expand Up @@ -77,19 +76,6 @@ function set_dev {
fi
}

function set_debug {
get_current
if [ "${current_env}" != debug ]
then
docker compose down
rm -f ${override_link}
ln -s ${override_file_debug} ${override_link}
echo "Now using 'debug' configuration."
else
echo "Already using 'debug' configuration."
fi
}

function set_unit_tests {
get_current
if [ "${current_env}" != unit_tests ]
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The open-source edition is [available on
GitHub](https://github.com/DefectDojo/django-DefectDojo).

A running example is available on [our demo server](https://demo.defectdojo.org),
using the credentials `admin` / `defectdojo@demo#appsec`. Note: The demo
using the credentials `admin` / `1Defectdojo@demo#appsec`. Note: The demo
server is refreshed regularly and provisioned with some sample data.

### DefectDojo Pro and Enterprise
Expand Down
7 changes: 7 additions & 0 deletions docs/content/en/getting_started/upgrading/2.39.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 'Upgrading to DefectDojo Version 2.39.x'
toc_hide: true
weight: -20240903
description: No special instructions.
---
There are no special instructions for upgrading to 2.39.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.39.0) for the contents of the release.
1 change: 1 addition & 0 deletions docs/content/en/integrations/api-v2-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ For example: :

If you use [an alternative authentication method](../social-authentication/) for users, you may want to disable DefectDojo API tokens because it could bypass your authentication concept. \
Using of DefectDojo API tokens can be disabled by specifying the environment variable `DD_API_TOKENS_ENABLED` to `False`.
Or only `api/v2/api-token-auth/` endpoint can be disabled by setting `DD_API_TOKEN_AUTH_ENDPOINT_ENABLED` to `False`.

## Sample Code

Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/integrations/burp-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Defect Dojo Burp plugin"
description: "Export findings directly from Burp to DefectDojo."
draft: false
weight: 8
weight: 9
---

**Please note: The DefectDojo Burp Plugin has been sunset and is no longer a supported feature.**
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/integrations/exporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Exporting"
description: "DefectDojo has the ability to export findings."
draft: false
weight: 11
weight: 12
---


Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/integrations/google-sheets-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Google Sheets synchronisation"
description: "Export finding details to Google Sheets and upload changes from Google Sheets."
draft: false
weight: 7
weight: 8
---

**Please note - the Google Sheets feature has been deprecated as of DefectDojo version 2.21.0 - these documents are for reference only.**
Expand Down
Loading

0 comments on commit 52c569f

Please sign in to comment.