From f982167c0ae84d777cef22a2c18a68f12b8c93b2 Mon Sep 17 00:00:00 2001 From: Shira Cohen <97398476+ShiraCohen33@users.noreply.github.com> Date: Wed, 1 Jun 2022 15:39:40 +0300 Subject: [PATCH] fix(report): change github format version to required (#2229) --- integration/testdata/alpine-310.gsbom.golden | 1 + pkg/report/github/github.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/testdata/alpine-310.gsbom.golden b/integration/testdata/alpine-310.gsbom.golden index 5ffd89ff0d..c0153c4abe 100644 --- a/integration/testdata/alpine-310.gsbom.golden +++ b/integration/testdata/alpine-310.gsbom.golden @@ -1,4 +1,5 @@ { + "version": 0, "detector": { "name": "trivy", "version": "dev", diff --git a/pkg/report/github/github.go b/pkg/report/github/github.go index 3a489c4cb5..5e51b8aa5a 100644 --- a/pkg/report/github/github.go +++ b/pkg/report/github/github.go @@ -55,7 +55,7 @@ type Detector struct { } type DependencySnapshot struct { - Version int `json:"version,omitempty"` + Version int `json:"version"` Detector Detector `json:"detector"` Metadata Metadata `json:"metadata,omitempty"` Ref string `json:"ref,omitempty"`