Skip to content

chore(deps): replace yaml lib #1960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/clair/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/stackrox/scanner/database"
"github.com/stackrox/scanner/pkg/analyzer"
"github.com/stackrox/scanner/pkg/updater"
"gopkg.in/yaml.v2"
"go.yaml.in/yaml/v3"
)

// File represents a YAML configuration file that namespaces all
Expand Down
2 changes: 1 addition & 1 deletion database/pgsql/pgsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/stackrox/scanner/database/metrics"
"github.com/stackrox/scanner/database/pgsql/migrations"
"github.com/stackrox/scanner/pkg/commonerr"
"gopkg.in/yaml.v2"
"go.yaml.in/yaml/v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion ext/vulnsrc/alpine/alpine.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/stackrox/scanner/ext/versionfmt/apk"
"github.com/stackrox/scanner/ext/vulnsrc"
"github.com/stackrox/scanner/pkg/fsutil"
"gopkg.in/yaml.v2"
"go.yaml.in/yaml/v3"
)

const (
Expand Down
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/distribution/reference v0.6.0
github.com/docker/distribution v2.8.3+incompatible
github.com/facebookincubator/nvdtools v0.1.5
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-git/go-billy/v5 v5.6.2
github.com/go-git/go-git/v5 v5.16.2
github.com/google/go-cmp v0.7.0
Expand Down Expand Up @@ -47,14 +46,15 @@ require (
go.etcd.io/bbolt v1.4.0
go.uber.org/goleak v1.3.0
go.uber.org/ratelimit v0.3.1
go.yaml.in/yaml/v3 v3.0.3
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/sys v0.33.0
google.golang.org/api v0.238.0
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822
google.golang.org/grpc v1.73.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
google.golang.org/protobuf v1.36.6
gopkg.in/yaml.v2 v2.4.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand Down Expand Up @@ -93,6 +93,7 @@ require (
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/facebookincubator/flog v0.0.0-20190930132826-d2511d0ce33c // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand Down Expand Up @@ -178,6 +179,7 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.29.3 // indirect
k8s.io/apimachinery v0.29.3 // indirect
Expand All @@ -188,7 +190,6 @@ require (
nhooyr.io/websocket v1.8.11 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

// @stackrox/scanner
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/ratelimit v0.3.1 h1:K4qVE+byfv/B3tC+4nYWP7v/6SimcO7HzHekoMNBma0=
go.uber.org/ratelimit v0.3.1/go.mod h1:6euWsTB6U/Nb3X++xEUXA8ciPJvr19Q/0h1+oDcJhRk=
go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
2 changes: 1 addition & 1 deletion pkg/vulnloader/istioloader/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package istioloader
import (
"io"

"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/stackrox/istio-cves/types"
"sigs.k8s.io/yaml"
)

// LoadYAMLFileFromReader loads the Istio CVE feed from the given io.Reader.
Expand Down
2 changes: 1 addition & 1 deletion pkg/vulnloader/k8sloader/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package k8sloader
import (
"io"

"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/stackrox/k8s-cves/pkg/validation"
"sigs.k8s.io/yaml"
)

// LoadYAMLFileFromReader loads the Kubernetes CVE feed from the given io.Reader.
Expand Down
2 changes: 1 addition & 1 deletion pkg/vulnloader/nvdloader/enricher.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"path/filepath"

"github.com/facebookincubator/nvdtools/vulndb"
"github.com/ghodss/yaml"
"github.com/go-git/go-billy/v5/memfs"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/storage/memory"
"github.com/pkg/errors"
"github.com/stackrox/dotnet-scraper/types"
"sigs.k8s.io/yaml"
)

const (
Expand Down