@@ -87,15 +87,15 @@ jobs:
8787          token_format : access_token 
8888          workload_identity_provider : ${{ secrets.GCP_WORKLOAD_IDENTITY }} 
8989          service_account : ${{ secrets.GCP_SERVICE_ACCOUNT }} 
90-         if : ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }} 
90+         if : ${{ github.event_name != 'pull_request' && ( contains(inputs.image, 'plus') || inputs.image == 'plus-waf ') }} 
9191
9292      - name : Login to GAR 
9393        uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772  #  v3.4.0
9494        with :
9595          registry : us-docker.pkg.dev 
9696          username : oauth2accesstoken 
9797          password : ${{ steps.auth.outputs.access_token }} 
98-         if : ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }} 
98+         if : ${{ github.event_name != 'pull_request' && ( contains(inputs.image, 'plus') || inputs.image == 'plus-waf ') }} 
9999
100100      - name : Docker meta 
101101        id : meta 
@@ -106,7 +106,9 @@ jobs:
106106            name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric,enable=${{ inputs.image == 'ngf' && github.event_name != 'pull_request' }} 
107107            name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/nginx,enable=${{ inputs.image == 'nginx' && github.event_name != 'pull_request' }} 
108108            name=docker-mgmt.nginx.com/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }} 
109+             name=docker-mgmt.nginx.com/nginx-gateway-fabric/nginx-plus-nap-waf,enable=${{ inputs.image == 'plus-waf' && github.event_name != 'pull_request' }} 
109110            name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }} 
111+             name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus-nap-waf,enable=${{ inputs.image == 'plus-waf' && github.event_name != 'pull_request' }} 
110112            name=localhost:5000/nginx-gateway-fabric/${{ inputs.image }} 
111113           flavor : | 
112114            latest=${{ (inputs.tag != '' && 'true') || 'auto' }} 
@@ -134,7 +136,7 @@ jobs:
134136      - name : Build Docker Image 
135137        uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83  #  v6.18.0
136138        with :
137-           file : build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || '' }} 
139+           file : build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ ( inputs.image == 'plus' || inputs.image == 'plus-waf')  && '.nginxplus' || '' }} 
138140          context : " ." 
139141          target : ${{ inputs.image == 'ngf' && 'goreleaser' || '' }} 
140142          tags : ${{ steps.meta.outputs.tags }} 
@@ -152,13 +154,30 @@ jobs:
152154            NJS_DIR=internal/controller/nginx/modules/src 
153155            NGINX_CONF_DIR=internal/controller/nginx/conf 
154156            BUILD_AGENT=gha 
157+             ${{ inputs.image == 'plus-waf' && 'ALPINE_VERSION=3.19' || '' }} 
158+             ${{ inputs.image == 'plus-waf' && 'INCLUDE_NAP_WAF=true' || '' }} 
155159           secrets : | 
156160            ${{ contains(inputs.image, 'plus') && format('"nginx-repo.crt={0}"', secrets.NGINX_CRT) || '' }} 
157161            ${{ contains(inputs.image, 'plus') && format('"nginx-repo.key={0}"', secrets.NGINX_KEY) || '' }} 
158162
159163       - name : Inspect SBOM and output manifest 
160164        run : | 
165+           if [[ "${{ inputs.image }}" == "plus-waf" ]]; then 
166+           # For plus-waf, use syft directly 
167+           echo "Generating SBOM for plus-waf using syft..." 
168+ 
169+           # Install syft if not available 
170+           if ! command -v syft >/dev/null 2>&1; then 
171+           curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin 
172+           fi 
173+ 
174+           # Generate SBOM using syft directly for plus-waf (known to work with NAP WAF) 
175+           syft localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} -o spdx-json > sbom-${{ inputs.image }}.json 
176+           echo "Generated SBOM using syft for plus-waf" 
177+           else 
178+           # For other images, use the standard Docker buildx approach 
161179          docker buildx imagetools inspect localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} --format '{{ json (index .SBOM "linux/amd64").SPDX }}' > sbom-${{ inputs.image }}.json 
180+           fi 
162181          docker buildx imagetools inspect localhost:5000/nginx-gateway-fabric/${{ inputs.image }}:${{ steps.meta.outputs.version }} --raw 
163182
164183       - name : Scan SBOM 
@@ -176,4 +195,4 @@ jobs:
176195        with :
177196          sarif_file : ${{ steps.scan.outputs.sarif }} 
178197          category : build-${{ inputs.image }} 
179-         if : always() 
198+         if : always() && steps.scan.conclusion == 'success'  
0 commit comments