From 955962d9c8303a2418bfff909584eceba37047c6 Mon Sep 17 00:00:00 2001 From: Mykhailo Koziaryk Date: Tue, 24 Nov 2026 15:31:29 +0200 Subject: [PATCH] fix(e2e-targets): redirect http to https for targets with http duplicates Same issue as dvwa in #110. These apps run Apache/Tomcat behind the TLS-terminating ingress and emit absolute http redirects (e.g. beebox: https://host/bWAPP -> 301 http://host/bWAPP/). Since nexploit#5669 the crawler probes follow them, and with the cluster default ssl-redirect "False" the app is served over plain http, so discoveries get an http copy of part of the site. Plain-http entrypoints in the 11-24 discovery nightly: sqli 163 of 408, vulnlab 76 of 216, commix 46 of 303, beebox 23 of 361, altoroj 4 of 28. Add ingress.sslRedirect to simple-service 0.5.3 (default "False", no change for other charts) and set it to "True" for vulnlab, commix, beebox and altoroj; set nginx.org/ssl-redirect "True" in the sqli ingress. vulnlab moves from simple-service 0.0.1, commix from 0.5.0. --- charts/altoroj/Chart.yaml | 4 ++-- charts/altoroj/values.yaml | 3 +++ charts/beebox/Chart.yaml | 4 ++-- charts/beebox/values.yaml | 3 +++ charts/commix/Chart.yaml | 4 ++-- charts/commix/values.yaml | 3 +++ charts/sqli/Chart.yaml | 2 +- charts/sqli/templates/ingress.yaml | 3 ++- charts/vulnlab/Chart.yaml | 4 ++-- charts/vulnlab/values.yaml | 3 +++ simple-service/Chart.yaml | 2 +- simple-service/templates/ingress.yaml | 2 +- simple-service/values.yaml | 3 +++ 13 files changed, 28 insertions(+), 12 deletions(-) diff --git a/charts/altoroj/Chart.yaml b/charts/altoroj/Chart.yaml index 7d8ef7e..71aafd7 100644 --- a/charts/altoroj/Chart.yaml +++ b/charts/altoroj/Chart.yaml @@ -9,8 +9,8 @@ description: | type: application keywords: - altoroj -version: 0.0.6 +version: 0.0.7 dependencies: - name: simple-service - version: 0.5.2 + version: 0.5.3 repository: "file://../../simple-service" diff --git a/charts/altoroj/values.yaml b/charts/altoroj/values.yaml index 270c6a7..8feb35b 100644 --- a/charts/altoroj/values.yaml +++ b/charts/altoroj/values.yaml @@ -1,4 +1,7 @@ simple-service: + ingress: + # Apache/Tomcat behind TLS termination emits absolute http redirects + sslRedirect: "True" podAnnotations: # Keep Karpenter consolidation from evicting the target mid-test (IR-835) karpenter.sh/do-not-disrupt: "true" diff --git a/charts/beebox/Chart.yaml b/charts/beebox/Chart.yaml index 3f4837f..64853d4 100644 --- a/charts/beebox/Chart.yaml +++ b/charts/beebox/Chart.yaml @@ -5,8 +5,8 @@ type: application keywords: - beebox - bwapp -version: 0.0.8 +version: 0.0.9 dependencies: - name: simple-service - version: 0.5.2 + version: 0.5.3 repository: "file://../../simple-service" diff --git a/charts/beebox/values.yaml b/charts/beebox/values.yaml index c7e868a..2c3de69 100644 --- a/charts/beebox/values.yaml +++ b/charts/beebox/values.yaml @@ -1,4 +1,7 @@ simple-service: + ingress: + # Apache/Tomcat behind TLS termination emits absolute http redirects + sslRedirect: "True" podAnnotations: # Keep Karpenter consolidation from evicting the target mid-test (IR-835) karpenter.sh/do-not-disrupt: "true" diff --git a/charts/commix/Chart.yaml b/charts/commix/Chart.yaml index 1431503..be3cc62 100644 --- a/charts/commix/Chart.yaml +++ b/charts/commix/Chart.yaml @@ -4,8 +4,8 @@ description: Commix app type: application keywords: - commix -version: 0.0.7 +version: 0.0.8 dependencies: - name: simple-service - version: 0.5.0 + version: 0.5.3 repository: "file://../../simple-service" diff --git a/charts/commix/values.yaml b/charts/commix/values.yaml index 763c35d..a3738c7 100644 --- a/charts/commix/values.yaml +++ b/charts/commix/values.yaml @@ -1,4 +1,7 @@ simple-service: + ingress: + # Apache/Tomcat behind TLS termination emits absolute http redirects + sslRedirect: "True" application: image: commixproject/commix-testbed port: 80 diff --git a/charts/sqli/Chart.yaml b/charts/sqli/Chart.yaml index 24d18cd..99ddc72 100644 --- a/charts/sqli/Chart.yaml +++ b/charts/sqli/Chart.yaml @@ -4,4 +4,4 @@ description: A Helm chart for Kubernetes type: application keywords: - sqli -version: 1.0.20 +version: 1.0.21 diff --git a/charts/sqli/templates/ingress.yaml b/charts/sqli/templates/ingress.yaml index 1811da2..b47bd01 100644 --- a/charts/sqli/templates/ingress.yaml +++ b/charts/sqli/templates/ingress.yaml @@ -8,7 +8,8 @@ metadata: namespace: {{ .Release.Namespace }} annotations: kubernetes.io/ingress.class: nginx - nginx.org/ssl-redirect: "False" + # The app emits absolute http redirects behind TLS termination; keep the crawler on https + nginx.org/ssl-redirect: "True" nginx.org/proxy-connect-timeout: "75s" nginx.org/proxy-send-timeout: "360s" nginx.org/proxy-read-timeout: "360s" diff --git a/charts/vulnlab/Chart.yaml b/charts/vulnlab/Chart.yaml index b5c88d4..41d5e6b 100644 --- a/charts/vulnlab/Chart.yaml +++ b/charts/vulnlab/Chart.yaml @@ -4,8 +4,8 @@ description: Web vulnerability lab project by Yavuzlar type: application keywords: - vulnlab -version: 0.0.3 +version: 0.0.4 dependencies: - name: simple-service - version: 0.0.1 + version: 0.5.3 repository: "file://../../simple-service" diff --git a/charts/vulnlab/values.yaml b/charts/vulnlab/values.yaml index 59de29d..1eaca6d 100644 --- a/charts/vulnlab/values.yaml +++ b/charts/vulnlab/values.yaml @@ -1,4 +1,7 @@ simple-service: + ingress: + # Apache/Tomcat behind TLS termination emits absolute http redirects + sslRedirect: "True" application: image: yavuzlar/vulnlab port: 80 diff --git a/simple-service/Chart.yaml b/simple-service/Chart.yaml index 0113139..ff25f96 100644 --- a/simple-service/Chart.yaml +++ b/simple-service/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: simple-service description: A simple service with customizable name and port type: application -version: 0.5.2 +version: 0.5.3 appVersion: "0.1.0" diff --git a/simple-service/templates/ingress.yaml b/simple-service/templates/ingress.yaml index 8e976e2..431a644 100644 --- a/simple-service/templates/ingress.yaml +++ b/simple-service/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: {{ .Values.ingress.sslRedirect | default "False" | quote }} # F5 NGINX Ingress Controller only proxies WebSocket upgrades for listed services nginx.org/websocket-services: "{{ .Release.Name }}" {{ if eq .Values.ingress.cert "" }} diff --git a/simple-service/values.yaml b/simple-service/values.yaml index 3678ce6..3e1fff1 100644 --- a/simple-service/values.yaml +++ b/simple-service/values.yaml @@ -1,5 +1,8 @@ ingress: cert: "distributorwildcard" + # nginx.org/ssl-redirect. "True" for targets whose app emits absolute http redirects + # behind the TLS-terminating ingress (avoids http/https duplicate entrypoints). + sslRedirect: "False" # Extra pod annotations, e.g. karpenter.sh/do-not-disrupt for e2e targets. podAnnotations: {}