Skip to content

Commit

Permalink
ci: suppress false-positive CVE in CRD image scanner (#2033)
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Singhal <[email protected]>
  • Loading branch information
akashsinghal authored Jan 15, 2025
1 parent 37b65e2 commit 3f9ae30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/crd.trivyignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vulnerabilities:
- id: CVE-2024-45338
statement: kubectl is not vulnerable to this and is reason for being flagged
7 changes: 3 additions & 4 deletions .github/workflows/scan-vulns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
TRIVY_VERSION: 0.49.1
TRIVY_VERSION: 0.58.2
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
Expand Down Expand Up @@ -73,6 +73,5 @@ jobs:
done
- name: Run trivy on images and exit on HIGH/CRITICAL severity
run: |
for img in "localbuild:test" "localbuildcrd:test"; do
trivy image --skip-db-update --ignore-unfixed --exit-code 1 --severity HIGH,CRITICAL --vuln-type="os,library" "${img}"
done
trivy image --skip-db-update --ignore-unfixed --exit-code 1 --severity HIGH,CRITICAL --vuln-type="os,library" "localbuild:test"
trivy image --skip-db-update --ignore-unfixed --exit-code 1 --severity HIGH,CRITICAL --vuln-type="os,library" --show-suppressed --ignorefile ./.github/crd.trivyignore.yaml "localbuildcrd:test"

0 comments on commit 3f9ae30

Please sign in to comment.