Skip to content

Commit

Permalink
Update Trivy GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
thegridman committed Oct 25, 2024
1 parent d6e6fd5 commit eaa5a74
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1974,19 +1974,17 @@ tanzu-install: ## Install the Coherence Operator package into Tanzu
# ======================================================================================================================
##@ Miscellaneous

TRIVY_IMAGE=ghcr.io/aquasecurity/trivy:0.54.1
TRIVY_CACHE ?=

.PHONY: trivy-scan
trivy-scan: build-operator-images $(TOOLS_BIN)/trivy ## Scan the Operator image using Trivy

ifeq (Darwin, $(UNAME_S))
$(TOOLS_BIN)/trivy --cache-dir $(HOME)/Library/Caches/trivy image $(OPERATOR_IMAGE)
$(TOOLS_BIN)/trivy --exit-code 1 --severity CRITICAL,HIGH --cache-dir $(HOME)/Library/Caches/trivy image $(OPERATOR_IMAGE)
else
ifdef TRIVY_CACHE
$(TOOLS_BIN)/trivy --cache-dir $(TRIVY_CACHE) image $(OPERATOR_IMAGE)
$(TOOLS_BIN)/trivy --exit-code 1 --severity CRITICAL,HIGH --cache-dir $(TRIVY_CACHE) image $(OPERATOR_IMAGE)
else
$(TOOLS_BIN)/trivy image $(OPERATOR_IMAGE)
$(TOOLS_BIN)/trivy --exit-code 1 --severity CRITICAL,HIGH image $(OPERATOR_IMAGE)
endif
endif

Expand Down

0 comments on commit eaa5a74

Please sign in to comment.