From 0795fcf10c0b09cc3fd159b38fef8ca1d960f795 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 3 Dec 2025 23:23:19 +0000 Subject: [PATCH] fix: update integration test to use hashed ruleset filenames - Use glob pattern for ruleset file inspection (integration-xss-*.conf) - Increase wait time for monitor mode config application from 2s to 5s - Aligns with manager.go hash-based filename generation --- scripts/coraza_integration.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/coraza_integration.sh b/scripts/coraza_integration.sh index 921633df..9e1735bd 100644 --- a/scripts/coraza_integration.sh +++ b/scripts/coraza_integration.sh @@ -107,7 +107,7 @@ curl -s http://localhost:2019/config | grep -n "waf" || true curl -s http://localhost:2019/config | grep -n "integration-xss" || true echo "Inspecting ruleset file inside container..." -docker exec charon-debug cat /app/data/caddy/coraza/rulesets/integration-xss.conf || true +docker exec charon-debug sh -c 'cat /app/data/caddy/coraza/rulesets/integration-xss-*.conf' || true echo "Recent caddy logs (may contain plugin errors):" docker logs charon-debug | tail -n 200 || true @@ -127,10 +127,10 @@ SEC_CFG_MONITOR='{"name":"default","enabled":true,"waf_mode":"monitor","waf_rule curl -s -X POST -H "Content-Type: application/json" -d "${SEC_CFG_MONITOR}" -b ${TMP_COOKIE} http://localhost:8080/api/v1/security/config echo "Wait for Caddy to apply monitor mode config..." -sleep 2 +sleep 5 echo "Inspecting ruleset file (should now have DetectionOnly)..." -docker exec charon-debug cat /app/data/caddy/coraza/rulesets/integration-xss.conf | head -5 || true +docker exec charon-debug sh -c 'cat /app/data/caddy/coraza/rulesets/integration-xss-*.conf | head -5' || true RESPONSE_MONITOR=$(curl -s -o /dev/null -w "%{http_code}" -d "" -H "Host: integration.local" http://localhost/post) if [ "$RESPONSE_MONITOR" = "200" ]; then