diff --git a/.github/workflows/scan-images.yaml b/.github/workflows/scan-images.yaml index 6c861f8b..dde6494a 100644 --- a/.github/workflows/scan-images.yaml +++ b/.github/workflows/scan-images.yaml @@ -46,10 +46,6 @@ jobs: DATA=$(cat /tmp/images_list.txt | jq -R -s -c 'split("\n")[:-1]') echo "::set-output name=images-array::$DATA" - - name: Debug - run: | - echo ${{ steps.set-images-array.outputs.images-array }} - scan-images: name: Scan images in bundle runs-on: ubuntu-22.04 @@ -58,6 +54,9 @@ jobs: matrix: image: ${{ fromJSON(needs.get-images.outputs.images-array) }} steps: + - name: Prepare environment + run: mkdir -p /tmp/trivy-reports + - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@0.20.0 with: @@ -67,6 +66,11 @@ jobs: exit-code: '1' ignore-unfixed: true severity: 'CRITICAL,HIGH' + + - name: Change name of output + run: | + FILENAME=$(echo ${{ matrix.image }} | sed 's/:/-/g; s/\//-/g; s/\./-/g') + mv /tmp/trivy-reports/${{ matrix.image }}* /tmp/trivy-reports/$FILENAME # # - name: Prepare artifacts # run: |