Skip to content

Commit 69ef679

Browse files
authored
chore(deps): replace yaml lib (#1960)
Signed-off-by: Tomasz Janiszewski <[email protected]>
1 parent d50ac85 commit 69ef679

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

cmd/clair/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/stackrox/scanner/database"
2525
"github.com/stackrox/scanner/pkg/analyzer"
2626
"github.com/stackrox/scanner/pkg/updater"
27-
"gopkg.in/yaml.v2"
27+
"go.yaml.in/yaml/v3"
2828
)
2929

3030
// File represents a YAML configuration file that namespaces all

database/pgsql/pgsql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/stackrox/scanner/database/metrics"
3232
"github.com/stackrox/scanner/database/pgsql/migrations"
3333
"github.com/stackrox/scanner/pkg/commonerr"
34-
"gopkg.in/yaml.v2"
34+
"go.yaml.in/yaml/v3"
3535
)
3636

3737
const (

ext/vulnsrc/alpine/alpine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/stackrox/scanner/ext/versionfmt/apk"
3131
"github.com/stackrox/scanner/ext/vulnsrc"
3232
"github.com/stackrox/scanner/pkg/fsutil"
33-
"gopkg.in/yaml.v2"
33+
"go.yaml.in/yaml/v3"
3434
)
3535

3636
const (

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ require (
1414
github.com/distribution/reference v0.6.0
1515
github.com/docker/distribution v2.8.3+incompatible
1616
github.com/facebookincubator/nvdtools v0.1.5
17-
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
1817
github.com/go-git/go-billy/v5 v5.6.2
1918
github.com/go-git/go-git/v5 v5.16.2
2019
github.com/google/go-cmp v0.7.0
@@ -47,14 +46,15 @@ require (
4746
go.etcd.io/bbolt v1.4.0
4847
go.uber.org/goleak v1.3.0
4948
go.uber.org/ratelimit v0.3.1
49+
go.yaml.in/yaml/v3 v3.0.3
5050
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
5151
golang.org/x/sys v0.33.0
5252
google.golang.org/api v0.239.0
5353
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822
5454
google.golang.org/grpc v1.73.0
5555
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
5656
google.golang.org/protobuf v1.36.6
57-
gopkg.in/yaml.v2 v2.4.0
57+
sigs.k8s.io/yaml v1.4.0
5858
)
5959

6060
require (
@@ -93,6 +93,7 @@ require (
9393
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
9494
github.com/facebookincubator/flog v0.0.0-20190930132826-d2511d0ce33c // indirect
9595
github.com/felixge/httpsnoop v1.0.4 // indirect
96+
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
9697
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
9798
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
9899
github.com/go-logr/logr v1.4.2 // indirect
@@ -178,6 +179,7 @@ require (
178179
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
179180
gopkg.in/inf.v0 v0.9.1 // indirect
180181
gopkg.in/warnings.v0 v0.1.2 // indirect
182+
gopkg.in/yaml.v2 v2.4.0 // indirect
181183
gopkg.in/yaml.v3 v3.0.1 // indirect
182184
k8s.io/api v0.29.3 // indirect
183185
k8s.io/apimachinery v0.29.3 // indirect
@@ -188,7 +190,6 @@ require (
188190
nhooyr.io/websocket v1.8.11 // indirect
189191
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
190192
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
191-
sigs.k8s.io/yaml v1.4.0 // indirect
192193
)
193194

194195
// @stackrox/scanner

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
759759
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
760760
go.uber.org/ratelimit v0.3.1 h1:K4qVE+byfv/B3tC+4nYWP7v/6SimcO7HzHekoMNBma0=
761761
go.uber.org/ratelimit v0.3.1/go.mod h1:6euWsTB6U/Nb3X++xEUXA8ciPJvr19Q/0h1+oDcJhRk=
762+
go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
763+
go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
762764
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
763765
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
764766
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

pkg/vulnloader/istioloader/yaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package istioloader
33
import (
44
"io"
55

6-
"github.com/ghodss/yaml"
76
"github.com/pkg/errors"
87
"github.com/stackrox/istio-cves/types"
8+
"sigs.k8s.io/yaml"
99
)
1010

1111
// LoadYAMLFileFromReader loads the Istio CVE feed from the given io.Reader.

pkg/vulnloader/k8sloader/yaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package k8sloader
33
import (
44
"io"
55

6-
"github.com/ghodss/yaml"
76
"github.com/pkg/errors"
87
"github.com/stackrox/k8s-cves/pkg/validation"
8+
"sigs.k8s.io/yaml"
99
)
1010

1111
// LoadYAMLFileFromReader loads the Kubernetes CVE feed from the given io.Reader.

pkg/vulnloader/nvdloader/enricher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55
"path/filepath"
66

77
"github.com/facebookincubator/nvdtools/vulndb"
8-
"github.com/ghodss/yaml"
98
"github.com/go-git/go-billy/v5/memfs"
109
"github.com/go-git/go-git/v5"
1110
"github.com/go-git/go-git/v5/storage/memory"
1211
"github.com/pkg/errors"
1312
"github.com/stackrox/dotnet-scraper/types"
13+
"sigs.k8s.io/yaml"
1414
)
1515

1616
const (

0 commit comments

Comments
 (0)