From e3e7b9df73ab5af3b67fb9705a9a3226cc25df5a Mon Sep 17 00:00:00 2001 From: Stefan Schlesinger Date: Tue, 21 Mar 2023 07:01:17 +0100 Subject: [PATCH] fix(ci): minor corrections from code review --- .github/workflows/container-image.yaml | 12 ++++++------ Dockerfile | 2 +- docker/coraza-spoa/docker-entrypoint.sh | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/container-image.yaml b/.github/workflows/container-image.yaml index 5393fb1..52e71ef 100644 --- a/.github/workflows/container-image.yaml +++ b/.github/workflows/container-image.yaml @@ -57,7 +57,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Docker metadata - Main - id: meta1 + id: meta-main uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} @@ -77,12 +77,12 @@ jobs: platforms: linux/amd64 file: Dockerfile push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta1.outputs.tags }} - labels: ${{ steps.meta1.outputs.labels }} + tags: ${{ steps.meta-main.outputs.tags }} + labels: ${{ steps.meta-main.outputs.labels }} - name: Docker metadata - CRS4 - id: meta4 + id: meta-crs4 uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} @@ -107,5 +107,5 @@ jobs: target: coreruleset build-args: | CORERULESET_VERSION=v4.0.0-rc1 - tags: ${{ steps.meta4.outputs.tags }} - labels: ${{ steps.meta4.outputs.labels }} + tags: ${{ steps.meta-crs4.outputs.tags }} + labels: ${{ steps.meta-crs4.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index b502f44..a320b69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ FROM alpine:3.17 AS main ARG TARGETARCH -LABEL org.opencontainers.image.authors="OWASP Coraza Maintainers" \ +LABEL org.opencontainers.image.authors="The OWASP Coraza contributors" \ org.opencontainers.image.description="OWASP Coraza WAF (Haproxy SPOA)" \ org.opencontainers.image.documentation="https://coraza.io/connectors/coraza-spoa/" \ org.opencontainers.image.licenses="Apache-2.0" \ diff --git a/docker/coraza-spoa/docker-entrypoint.sh b/docker/coraza-spoa/docker-entrypoint.sh index 01f556d..4633059 100755 --- a/docker/coraza-spoa/docker-entrypoint.sh +++ b/docker/coraza-spoa/docker-entrypoint.sh @@ -2,6 +2,8 @@ set -e +# Allow users to run arbitrary commands within the container + if [ $# -gt 0 ] && [ "$1" = "${1#-}" ]; then # First char isn't `-`, probably a `docker run -ti ` # Just exec and exit