Skip to content

Commit

Permalink
support cyclonedx spec 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlon Pina Tojal authored and fnxpt committed Mar 7, 2024
1 parent 76b8d18 commit 8eb8632
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/fnxpt/cyclonedx-merge
go 1.21.2

require (
github.com/CycloneDX/cyclonedx-go v0.7.2
github.com/CycloneDX/cyclonedx-go v0.8.0
github.com/google/go-cmp v0.6.0
github.com/stretchr/testify v1.8.4
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/CycloneDX/cyclonedx-go v0.7.2 h1:kKQ0t1dPOlugSIYVOMiMtFqeXI2wp/f5DBIdfux8gnQ=
github.com/CycloneDX/cyclonedx-go v0.7.2/go.mod h1:K2bA+324+Og0X84fA8HhN2X066K7Bxz4rpMQ4ZhjtSk=
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/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M=
github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
MergeModeSmart
)

var version = "0.0.4"
var version = "0.0.5"

var rootComponent = &cyclonedx.Component{
BOMRef: "root",
Expand Down
14 changes: 9 additions & 5 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ import (

func NewBOM(rootComponent *cyclonedx.Component) *cyclonedx.BOM {
sbom := cyclonedx.NewBOM()
sbom.SpecVersion = cyclonedx.SpecVersion1_5
sbom.Metadata = &cyclonedx.Metadata{
Tools: &[]cyclonedx.Tool{{
Vendor: "fnxpt",
Name: "cyclonedx-merge",
Version: "0.0.4",
}},
Tools: &cyclonedx.ToolsChoice{
Components: &[]cyclonedx.Component{
{
Name: "cyclonedx-merge",
Version: "0.0.5",
},
},
},
Timestamp: time.Now().Format(time.RFC3339),
Component: rootComponent,
}
Expand Down

0 comments on commit 8eb8632

Please sign in to comment.