From 4550c9b07dc296267e8548574fb63dbbdd61e3ac Mon Sep 17 00:00:00 2001 From: nscuro Date: Sun, 7 Apr 2024 01:40:59 +0200 Subject: [PATCH] fix: spec version validation Signed-off-by: nscuro --- internal/cli/options/options_test.go | 2 +- internal/util/util.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/cli/options/options_test.go b/internal/cli/options/options_test.go index ce8fed3f..33f0b5c7 100644 --- a/internal/cli/options/options_test.go +++ b/internal/cli/options/options_test.go @@ -42,7 +42,7 @@ func TestOutputOptions_Validate(t *testing.T) { t.Run("InvalidOutputVersion", func(t *testing.T) { var options OutputOptions - options.OutputVersion = "1.5" + options.OutputVersion = "1.6" err := options.Validate() require.Error(t, err) diff --git a/internal/util/util.go b/internal/util/util.go index 3f48df22..fba7b3f6 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -62,6 +62,8 @@ func ParseSpecVersion(specVersion string) (sv cdx.SpecVersion, err error) { sv = cdx.SpecVersion1_3 case cdx.SpecVersion1_4.String(): sv = cdx.SpecVersion1_4 + case cdx.SpecVersion1_5.String(): + sv = cdx.SpecVersion1_5 default: err = cdx.ErrInvalidSpecVersion }