From 35e4110191416f301f57d955ad7d7141a90143df Mon Sep 17 00:00:00 2001 From: Paul Abel <128620221+pdabelf5@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:07:57 +0100 Subject: [PATCH] ensure scan results directory is unique (#6050) --- .github/workflows/image-promotion.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image-promotion.yml b/.github/workflows/image-promotion.yml index d78fe9c6de..a5cd1a563e 100644 --- a/.github/workflows/image-promotion.yml +++ b/.github/workflows/image-promotion.yml @@ -342,7 +342,7 @@ jobs: pyxis_token: ${{ secrets.PYXIS_API_TOKEN }} scan-docker-oss: - name: Scan Docker OSS + name: Scan ${{ matrix.image }}-${{ matrix.target }} runs-on: ubuntu-22.04 needs: [checks] permissions: @@ -432,7 +432,7 @@ jobs: sarif_file: "${{ steps.directory.outputs.directory }}/" scan-docker-plus: - name: Scan Docker Plus + name: Scan ${{ matrix.image }}-${{ matrix.target }} runs-on: ubuntu-22.04 needs: [checks] permissions: @@ -522,7 +522,7 @@ jobs: sarif_file: "${{ steps.directory.outputs.directory }}/" scan-docker-nap: - name: Scan Docker Plus + NAP WAF/DOS + name: Scan ${{ matrix.image }}-${{ matrix.target }}-${{ matrix.nap_modules }} runs-on: ubuntu-22.04 needs: [checks] permissions: @@ -537,10 +537,17 @@ jobs: - name: Checkout Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: NAP modules + id: nap_modules + run: | + [[ "${{ matrix.nap_modules }}" == "waf,dos" ]] && modules="waf-dos" || name="${{ matrix.nap_modules }}" + echo "name=${name}" >> $GITHUB_OUTPUT + if: ${{ matrix.nap_modules != '' }} + - name: Make directory for security scan results id: directory run: | - directory=${{ matrix.image }}-${{ matrix.target }}-results + directory=${{ matrix.image }}-${{ matrix.target }}-${{ steps.nap_modules.outputs.name }}-results echo "directory=${directory}" >> $GITHUB_OUTPUT mkdir -p "${directory}"