Skip to content

Commit

Permalink
feat(sbom): migrate to CycloneDX v1.6 (#6903)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen authored Jun 11, 2024
1 parent 6e7f62d commit 09e50ce
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
github.com/BurntSushi/toml v1.4.0
github.com/CycloneDX/cyclonedx-go v0.8.0
github.com/CycloneDX/cyclonedx-go v0.9.0
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible
github.com/Masterminds/sprig/v3 v3.2.3
github.com/NYTimes/gziphandler v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/CycloneDX/cyclonedx-go v0.8.0 h1:FyWVj6x6hoJrui5uRQdYZcSievw3Z32Z88uYzG/0D6M=
github.com/CycloneDX/cyclonedx-go v0.8.0/go.mod h1:K2bA+324+Og0X84fA8HhN2X066K7Bxz4rpMQ4ZhjtSk=
github.com/CycloneDX/cyclonedx-go v0.9.0 h1:inaif7qD8bivyxp7XLgxUYtOXWtDez7+j72qKTMQTb8=
github.com/CycloneDX/cyclonedx-go v0.9.0/go.mod h1:NE/EWvzELOFlG6+ljX/QeMlVt9VKcTwu8u0ccsACEsw=
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible h1:juIaKLLVhqzP55d8x4cSVgwyQv76Z55/fRv/UBr2KkQ=
Expand Down
4 changes: 2 additions & 2 deletions integration/testdata/conda-cyclonedx.json.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000004",
"version": 1,
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions integration/testdata/conda-environment-cyclonedx.json.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000004",
"version": 1,
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000163",
"version": 1,
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions integration/testdata/pom-cyclonedx.json.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3ff14136-e09f-4df9-80ea-000000000005",
"version": 1,
"metadata": {
Expand Down
42 changes: 21 additions & 21 deletions pkg/sbom/cyclonedx/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000014",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -909,10 +909,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000007",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -1293,10 +1293,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000007",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -1518,10 +1518,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
BOM: testSBOM,
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000002",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -1770,10 +1770,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000004",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -1956,10 +1956,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000003",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down Expand Up @@ -2044,10 +2044,10 @@ func TestMarshaler_MarshalReport(t *testing.T) {
Results: types.Results{},
},
want: &cdx.BOM{
XMLNS: "http://cyclonedx.org/schema/bom/1.5",
XMLNS: "http://cyclonedx.org/schema/bom/1.6",
BOMFormat: "CycloneDX",
SpecVersion: cdx.SpecVersion1_5,
JSONSchema: "http://cyclonedx.org/schema/bom-1.5.schema.json",
SpecVersion: cdx.SpecVersion1_6,
JSONSchema: "http://cyclonedx.org/schema/bom-1.6.schema.json",
SerialNumber: "urn:uuid:3ff14136-e09f-4df9-80ea-000000000002",
Version: 1,
Metadata: &cdx.Metadata{
Expand Down
2 changes: 1 addition & 1 deletion pkg/sbom/cyclonedx/testdata/happy/bom.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"specVersion": "1.6",
"serialNumber": "urn:uuid:c986ba94-e37d-49c8-9e30-96daccd0415b",
"version": 1,
"metadata": {
Expand Down

0 comments on commit 09e50ce

Please sign in to comment.