chore: remove quality gate Makefile db age check (#2036)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow 2024-08-12 11:59:53 -04:00 committed by GitHub
parent 4ec46b5e24
commit b12a6f2dc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,6 @@ RESULT_SET = pr_vs_latest_via_sbom
TEST_DB_URL_FILE = ./test-db-url
TEST_DB_URL = $(shell cat $(TEST_DB_URL_FILE))
TEST_DB = db.tar.gz
LISTING_FILE = https://toolbox-data.anchore.io/grype/databases/listing.json
# formatting variables
BOLD := $(shell tput -T linux bold)
@ -34,15 +33,9 @@ validate: venv $(VULNERABILITY_LABELS)/Makefile ## Run all quality checks agains
capture: sboms vulns ## Collect and store all syft and grype results
.PHONY: capture
vulns: venv $(TEST_DB) check-db ## Collect and store all grype results
vulns: venv $(TEST_DB) ## Collect and store all grype results
$(YARDSTICK) -v result capture -r $(RESULT_SET)
.PHONY: check-db
check-db:
@echo "Looking for test DB within the hosted listing file (which prunes DBs older that 90 days or the last 90 objects)"
@curl -sSL $(LISTING_FILE) | jq '.available[][] | select(.url == "$(TEST_DB_URL)") ' --exit-status || (echo "$(RED)DB is too stale to be used for testing. Please re-pin with a more up-to-date version.$(RESET)" && false)
@echo "DB is fresh enough to be used for testing!"
$(TEST_DB):
@curl -o $(TEST_DB) -SsL $(TEST_DB_URL)