From 94aba83d01982ce6030ee78412a35b9387bf7f6e Mon Sep 17 00:00:00 2001 From: Mykhailo Koziaryk Date: Tue, 24 Nov 2026 10:35:17 +0200 Subject: [PATCH] fix(dvwa): redirect http to https in ingress Since nexploit#5669 the crawler's OpenDir, Robots and Sitemap probes follow one redirect. DVWA's Apache sits behind the TLS-terminating ingress, so its trailing-slash redirect is absolute http (`https://host/dvwa` -> `http://host/dvwa/`). With `ssl-redirect` disabled the ingress served the whole app over plain http, and the crawler built a second, http copy of the site from the listing links. That duplicated entrypoints and issues and made the DVWA e2e tests flaky (e.g. Directory Listing reported on `http://host/docs/`, extra Full Path Disclosure on `http://.../vulnerabilities/captcha/`). Redirect http to https in the dvwa and dvwa-medium-security ingresses, as a typical production deployment does, so scans stay on https. --- charts/dvwa-medium-security/Chart.yaml | 2 +- charts/dvwa-medium-security/templates/ingress.yaml | 2 +- charts/dvwa/Chart.yaml | 2 +- charts/dvwa/templates/ingress.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/dvwa-medium-security/Chart.yaml b/charts/dvwa-medium-security/Chart.yaml index 2ef5e06..d675d05 100644 --- a/charts/dvwa-medium-security/Chart.yaml +++ b/charts/dvwa-medium-security/Chart.yaml @@ -19,7 +19,7 @@ keywords: - dvwa-medium-security - dvwa-ms - dms -version: 1.0.1 +version: 1.0.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/dvwa-medium-security/templates/ingress.yaml b/charts/dvwa-medium-security/templates/ingress.yaml index 88f9a8c..bfdce8c 100644 --- a/charts/dvwa-medium-security/templates/ingress.yaml +++ b/charts/dvwa-medium-security/templates/ingress.yaml @@ -5,7 +5,7 @@ metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} annotations: - nginx.org/ssl-redirect: "False" + nginx.org/ssl-redirect: "True" {{ if eq .Values.ingress.cert "" }} cert-manager.io/cluster-issuer: letsencrypt-cf-prod {{ end }} diff --git a/charts/dvwa/Chart.yaml b/charts/dvwa/Chart.yaml index 3c0f9b1..2c43440 100644 --- a/charts/dvwa/Chart.yaml +++ b/charts/dvwa/Chart.yaml @@ -10,4 +10,4 @@ description: | type: application keywords: - dvwa -version: 0.0.8 +version: 0.0.9 diff --git a/charts/dvwa/templates/ingress.yaml b/charts/dvwa/templates/ingress.yaml index fbabc9d..0a0c069 100644 --- a/charts/dvwa/templates/ingress.yaml +++ b/charts/dvwa/templates/ingress.yaml @@ -5,7 +5,7 @@ metadata: namespace: {{.Release.Namespace}} annotations: kubernetes.io/ingress.class: nginx - nginx.org/ssl-redirect: "False" + nginx.org/ssl-redirect: "True" {{ if eq .Values.ingress.cert "" }} cert-manager.io/cluster-issuer: letsencrypt-cf-prod {{ end }}