diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cdfab26..2be06a0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,11 @@ env: TINYGO_VERSION: 0.33.0 # Run e2e tests against latest two releases and latest dev ENVOY_IMAGES: > + envoyproxy/envoy:v1.31-latest envoyproxy/envoy:v1.30-latest - envoyproxy/envoy:v1.29-latest envoyproxy/envoy-dev:latest - istio/proxyv2:1.22.1 - istio/proxyv2:1.21.3 + istio/proxyv2:1.23.3 + istio/proxyv2:1.22.6 jobs: build: diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index f7090aa..c61c47c 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -1,13 +1,13 @@ services: httpbin: - image: mccutchen/go-httpbin:v2.9.0 + image: mccutchen/go-httpbin:v2.15.0 command: [ "/bin/go-httpbin", "-port", "8081" ] ports: - 8081:8081 envoy: depends_on: - httpbin - image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.28-latest} + image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.31-latest} # Entryoint is explicited in order to make the ENVOY_IMAGE compatible also with istio/proxyv2 images # The latter has as default entrypoint pilot-agent instead of envoy # See https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/.github/workflows/workflow.yaml#L104 diff --git a/example/envoy/docker-compose.yml b/example/envoy/docker-compose.yml index 8fcb93d..fb10a0d 100644 --- a/example/envoy/docker-compose.yml +++ b/example/envoy/docker-compose.yml @@ -19,7 +19,7 @@ services: depends_on: - chown - httpbin - image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.28-latest} + image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.31-latest} command: - -c - /conf/envoy-config.yaml diff --git a/ftw/Dockerfile b/ftw/Dockerfile index bd8766e..e0005a3 100644 --- a/ftw/Dockerfile +++ b/ftw/Dockerfile @@ -1,16 +1,15 @@ # Copyright 2022 The OWASP Coraza contributors # SPDX-License-Identifier: Apache-2.0 -# Stick with go-ftw:0.6.4 until CRS tests new format is merged (https://github.com/coreruleset/coreruleset/pull/3369) -FROM ghcr.io/coreruleset/go-ftw:0.6.4 +FROM ghcr.io/coreruleset/go-ftw:1.1.0 RUN apk update && apk add curl WORKDIR /workspace # Keep this CRS version aligned with the one embedded in wasmplugin/rules -ADD https://github.com/coreruleset/coreruleset/archive/refs/tags/v4.3.0.tar.gz /workspace/coreruleset/ -RUN cd coreruleset && tar -xf v4.3.0.tar.gz --strip-components 1 +ADD https://github.com/coreruleset/coreruleset/archive/refs/tags/v4.5.0.tar.gz /workspace/coreruleset/ +RUN cd coreruleset && tar -xf v4.5.0.tar.gz --strip-components 1 COPY ftw.yml /workspace/ftw.yml COPY tests.sh /workspace/tests.sh diff --git a/ftw/docker-compose.yml b/ftw/docker-compose.yml index ac6fa26..fee130f 100644 --- a/ftw/docker-compose.yml +++ b/ftw/docker-compose.yml @@ -1,6 +1,6 @@ services: - httpbin: - image: mccutchen/go-httpbin:v2.9.0 + albedo: + image: ghcr.io/coreruleset/albedo:0.0.16 chown: image: alpine:3.16 command: @@ -13,8 +13,8 @@ services: envoy: depends_on: - chown - - httpbin - image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.28-latest} + - albedo + image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.31-latest} command: - -c - ${ENVOY_CONFIG:-/conf/envoy-config.yaml} diff --git a/ftw/envoy-config-nowasm.yaml b/ftw/envoy-config-nowasm.yaml index 423cf94..2c0a884 100644 --- a/ftw/envoy-config-nowasm.yaml +++ b/ftw/envoy-config-nowasm.yaml @@ -40,5 +40,5 @@ static_resources: - endpoint: address: socket_address: - address: httpbin + address: albedo port_value: 8080 diff --git a/ftw/envoy-config.yaml b/ftw/envoy-config.yaml index 20c85eb..81e19b9 100644 --- a/ftw/envoy-config.yaml +++ b/ftw/envoy-config.yaml @@ -70,5 +70,5 @@ static_resources: - endpoint: address: socket_address: - address: httpbin + address: albedo port_value: 8080 diff --git a/ftw/ftw.yml b/ftw/ftw.yml index f495ace..91a35e7 100644 --- a/ftw/ftw.yml +++ b/ftw/ftw.yml @@ -58,3 +58,5 @@ testoverride: '934120-39': 'Rule 934120 partially detected. With HTTP/1.1 Envoy return 400. With HTTP/2 Enclosed alphanumerics not detected. Coraza Side' '932200-13': 'Unfortunate match inside logs against a different rule log. wip' '930110-7': 'Coraza/CRS side: See https://github.com/corazawaf/coraza/pull/1081' + + '980170-3': 'FTW stops at Retrying test once' diff --git a/ftw/tests.sh b/ftw/tests.sh index d97d606..9dbb9e7 100755 --- a/ftw/tests.sh +++ b/ftw/tests.sh @@ -26,10 +26,16 @@ while [[ "$status_code" -eq "000" ]]; do exit 1 fi done +if [[ "$status_code" -ne "200" ]]; then + echo -e "\n[Fail] Unexpected status code $status_code, expected 200. Exiting." + exit 1 +fi echo -e "\n[Ok] Got status code $status_code, expected 200. Ready to start." + FTW_CLOUDMODE=${FTW_CLOUDMODE:-false} FTW_INCLUDE=$([ "${FTW_INCLUDE}" == "" ] && echo "" || echo "-i ${FTW_INCLUDE}") -/ftw run -d coreruleset/tests/regression/tests --config ftw.yml --read-timeout=10s --cloud=$FTW_CLOUDMODE $FTW_INCLUDE || exit 1 +/ftw run -d coreruleset/tests/regression/tests --config ftw.yml --read-timeout=10s --cloud=$FTW_CLOUDMODE $FTW_INCLUDE +