Skip to content

Commit

Permalink
Trivy image scan is case sensitive, set image path to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia committed Mar 6, 2024
1 parent 8b54f65 commit b684f1e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ jobs:
build-args: |
DCA_VERSION=${{ env.DCA_VERSION }}
- id: Lowercase image name for trivy
uses: ASzc/change-string-case-action@v6
with:
string: ${{ env.IMAGE_PATH }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ env.IMAGE_PATH }}:${{ steps.meta.outputs.version }}'
image-ref: '${{ steps.string.outputs.lowercase }}:${{ steps.meta.outputs.version }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
github-pat: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b684f1e

Please sign in to comment.