diff --git a/.github/workflows/vulnerabilities.yml b/.github/workflows/vulnerabilities.yml index 2d6e5171b..3c3e0ed25 100644 --- a/.github/workflows/vulnerabilities.yml +++ b/.github/workflows/vulnerabilities.yml @@ -32,9 +32,12 @@ jobs: severity: CRITICAL,HIGH scanners: vuln,misconfig,secret scan-ref: . + - name: Set lowercase image name + run: | + echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV" - name: Build locally the image from Dockerfile run: | - docker buildx build -t ${{ github.repository }}:${{ github.sha }} --platform linux/amd64 --no-cache -f Dockerfile . + docker buildx build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} --platform linux/amd64 --no-cache -f Dockerfile . - name: Scan locally built Docker image for vulnerabilities with trivy uses: aquasecurity/trivy-action@v0.35.0 env: @@ -46,4 +49,4 @@ jobs: ignore-unfixed: true severity: CRITICAL,HIGH vuln-type: os,library - image-ref: '${{ github.repository }}:${{ github.sha }}' + image-ref: '${{ env.IMAGE_NAME }}:${{ github.sha }}'