File tree Expand file tree Collapse file tree 7 files changed +36
-14
lines changed
Expand file tree Collapse file tree 7 files changed +36
-14
lines changed Original file line number Diff line number Diff line change 1717 runs-on : ubuntu-latest
1818 steps :
1919 - name : Checkout Repository
20- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2 .2
20+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0 .2
2121 - name : Check license headers
22- uses : apache/skywalking-eyes@5c5b974209f0de5d905f37deb69369068ebfc15c # tag=v0.7 .0
22+ uses : apache/skywalking-eyes@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # tag=v0.8 .0
2323 with :
2424 config : .licenserc.yml
2525
2929 runs-on : ubuntu-latest
3030 steps :
3131 - name : Checkout Repository
32- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2 .2
32+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0 .2
3333 - name : Setup Go
34- uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5 .0
34+ uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # tag=v6.2 .0
3535 with :
3636 go-version : " 1.22"
3737 check-latest : true
@@ -54,11 +54,11 @@ jobs:
5454 - " 1.22"
5555 steps :
5656 - name : Setup Go
57- uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5 .0
57+ uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # tag=v6.2 .0
5858 with :
5959 go-version : ${{ matrix.go }}
6060 check-latest : true
6161 - name : Checkout Repository
62- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2 .2
62+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0 .2
6363 - name : Test
6464 run : make test
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ jobs:
1616 contents : write
1717 steps :
1818 - name : Checkout Repository
19- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2 .2
19+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0 .2
2020 with :
2121 fetch-depth : 0
2222 - name : Setup Go
23- uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # tag=v5.5 .0
23+ uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # tag=v6.2 .0
2424 with :
2525 go-version : " 1.22"
2626 check-latest : true
2929 with :
3030 version : v1
3131 - name : Run GoReleaser
32- uses : goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # tag=v6.3 .0
32+ uses : goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # tag=v6.4 .0
3333 with :
3434 version : latest
3535 args : release --clean
Original file line number Diff line number Diff line change 1515# SPDX-License-Identifier: Apache-2.0
1616# Copyright (c) OWASP Foundation. All Rights Reserved.
1717
18- FROM gitpod/workspace-go:latest@sha256:8985eb7cf5f155eb83f07294e9bd1a7e8066f969711f51a166ef60d17d409eb0
18+ FROM gitpod/workspace-go:latest@sha256:08a7c684831db627751aa03b78179456c11497dcfa6de8d7d46a9b119fc0123a
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ func componentConverter(specVersion SpecVersion) func(*Component) {
165165 c .OmniborID = nil
166166 c .Manufacturer = nil
167167 c .Authors = nil
168+ c .Tags = nil
168169 }
169170
170171 if ! specVersion .supportsComponentType (c .Type ) {
Original file line number Diff line number Diff line change @@ -269,9 +269,30 @@ func Test_convertTrustZone(t *testing.T) {
269269 TrustZone : "trusted" ,
270270 },
271271 }
272+ bom .convert (SpecVersion1_5 )
273+ assert .Equal (t , "trusted" , (* bom .Services )[0 ].TrustZone )
274+ })
275+ }
276+
277+ func Test_convertTags (t * testing.T ) {
278+ t .Run ("spec 1.5 and lower" , func (t * testing.T ) {
279+ bom := NewBOM ()
280+ bom .Metadata = & Metadata {
281+ Component : & Component {
282+ Name : "test" ,
283+ Tags : & []string {"tag1" , "tag2" },
284+ },
285+ }
286+ bom .Components = & []Component {
287+ {
288+ Name : "foo" ,
289+ Tags : & []string {"tag3" , "tag4" },
290+ },
291+ }
272292
273293 bom .convert (SpecVersion1_5 )
274294
275- assert .Equal (t , "trusted" , (* bom .Services )[0 ].TrustZone )
295+ assert .Nil (t , bom .Metadata .Component .Tags )
296+ assert .Nil (t , (* bom .Components )[0 ].Tags )
276297 })
277298}
Original file line number Diff line number Diff line change 44
55require (
66 github.com/bradleyjkemp/cupaloy/v2 v2.8.0
7- github.com/stretchr/testify v1.10.0
7+ github.com/stretchr/testify v1.11.1
88 github.com/terminalstatic/go-xsd-validate v0.1.6
99 github.com/xeipuuv/gojsonschema v1.2.0
1010)
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
99github.com/stretchr/objx v0.1.1 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
1010github.com/stretchr/testify v1.3.0 /go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI =
1111github.com/stretchr/testify v1.6.1 /go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg =
12- github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA =
13- github.com/stretchr/testify v1.10.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
12+ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U =
13+ github.com/stretchr/testify v1.11.1 /go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U =
1414github.com/terminalstatic/go-xsd-validate v0.1.6 h1:TenYeQ3eY631qNi1/cTmLH/s2slHPRKTTHT+XSHkepo =
1515github.com/terminalstatic/go-xsd-validate v0.1.6 /go.mod h1:18lsvYFofBflqCrvo1umpABZ99+GneNTw2kEEc8UPJw =
1616github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c =
You can’t perform that action at this time.
0 commit comments