Skip to content

Commit

Permalink
chore: simplify PR
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Phillips <[email protected]>
  • Loading branch information
spiffcs committed Jun 24, 2024
1 parent 6f8ce81 commit 519fd18
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
13 changes: 0 additions & 13 deletions .github/scripts/update-quality-gate-db.sh

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/update-quality-gate-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ on:
schedule:
- cron: "0 16 1 * *" # first day of each month @ 11 AM EST

workflow-dispatch:
push:
branches:
- workflow-update-test-db

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ tasks:
update-quality-gate-db:
desc: Update pinned version of quality gate database
cmds:
- cmd: .github/scripts/update-quality-gate-db.sh
- cmd: "go run cmd/grype/main.go db list -o json | jq -r .[0].url > test/quality/test-db-url"
silent: true

list-tools:
Expand Down
4 changes: 2 additions & 2 deletions test/quality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VULNERABILITY_LABELS = ./vulnerability-labels
RESULT_SET = pr_vs_latest_via_sbom

# update periodically with values from "grype db list"
TEST_DB_URL = https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v5_2024-06-24T01:29:58Z_1719202889.tar.gz
TEST_DB_URL_FILE = ./test-db-url
TEST_DB = db.tar.gz
LISTING_FILE = https://toolbox-data.anchore.io/grype/databases/listing.json

Expand Down Expand Up @@ -43,7 +43,7 @@ check-db:
@echo "DB is fresh enough to be used for testing!"

$(TEST_DB):
curl -o $(TEST_DB) -SsL $(TEST_DB_URL)
@curl -o $(TEST_DB) -SsL `cat $(TEST_DB_URL_FILE)`

.PHONY: sboms
sboms: $(YARDSTICK_RESULT_DIR) venv clear-results ## Collect and store all syft results (deletes all existing results)
Expand Down
1 change: 1 addition & 0 deletions test/quality/test-db-url
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v5_2024-06-24T01:29:58Z_1719202889.tar.gz

0 comments on commit 519fd18

Please sign in to comment.