diff --git a/Makefile b/Makefile index bd701f4..2cf081d 100644 --- a/Makefile +++ b/Makefile @@ -16,15 +16,18 @@ BATS_ENV := BATS_LIB_PATH=$(BATS_LIB_PATH) \ BATS_FLAGS := --recursive --timing --verbose-run . .PHONY: test -test: - mkdir -p .cache +test: init-cache $(BATS_ENV) bats $(BATS_FLAGS) .PHONY: update-golden -update-golden: - mkdir -p .cache +update-golden: init-cache UPDATE_GOLDEN=1 $(BATS_ENV) bats $(BATS_FLAGS) +.PHONY: init-cache +init-cache: + mkdir -p .cache + rm -f .cache/fanal/fanal.db + bump-trivy: @[ $$NEW_VERSION ] || ( echo "env 'NEW_VERSION' is not set"; exit 1 ) @CURRENT_VERSION=$$(grep "TRIVY_VERSION:" .github/workflows/test.yaml | awk '{print $$2}');\ diff --git a/test/data/secret-scan/report.json b/test/data/secret-scan/report.json index ec3d59b..b22503e 100644 --- a/test/data/secret-scan/report.json +++ b/test/data/secret-scan/report.json @@ -2,6 +2,14 @@ "SchemaVersion": 2, "ArtifactName": "https://github.com/krol3/demo-trivy/", "ArtifactType": "repository", + "Metadata": { + "RepoURL": "https://github.com/krol3/demo-trivy/", + "Branch": "main", + "Commit": "547db823c73fdb3385871f6235e946c72291f734", + "CommitMsg": "chore: add gitignore", + "Author": "carolina valencia ", + "Committer": "carolina valencia " + }, "Results": [ { "Target": "env",