Skip to content

Commit

Permalink
chore: replace github.com/ghodss/yaml with sigs.k8s.io/yaml (#1387)
Browse files Browse the repository at this point in the history
At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.

`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.

Signed-off-by: Eng Zer Jun <[email protected]>
  • Loading branch information
Juneezee authored Nov 13, 2023
1 parent fd6acef commit 15c1199
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.15.0
github.com/gertd/go-pluralize v0.2.1
github.com/ghodss/yaml v1.0.0
github.com/gitsight/go-vcsurl v1.0.1
github.com/go-enry/go-enry/v2 v2.8.4
github.com/go-git/go-git/v5 v5.10.0
Expand All @@ -35,6 +34,7 @@ require (
golang.org/x/mod v0.14.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.13.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand Down Expand Up @@ -126,7 +126,6 @@ require (
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

require (
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/gertd/go-pluralize v0.2.1 h1:M3uASbVjMnTsPb0PNqg+E/24Vwigyo/tvyMTtAlLgiA=
github.com/gertd/go-pluralize v0.2.1/go.mod h1:rbYaKDbsXxmRfr8uygAEKhOWsjyrrqrkHVpZvoOp8zk=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gitleaks/go-gitdiff v0.9.0 h1:SHAU2l0ZBEo8g82EeFewhVy81sb7JCxW76oSPtR/Nqg=
github.com/gitleaks/go-gitdiff v0.9.0/go.mod h1:pKz0X4YzCKZs30BL+weqBIG7mx0jl4tF1uXV9ZyNvrA=
github.com/gitsight/go-vcsurl v1.0.1 h1:wkijKsbVg9R2IBP97U7wOANeIW9WJJKkBwS9XqllzWo=
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/process/settings/ruleValidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"strings"

"github.com/ghodss/yaml"
"github.com/xeipuuv/gojsonschema"
"sigs.k8s.io/yaml"
)

const SCHEMA_URL = "https://raw.githubusercontent.com/Bearer/bearer-rules/main/scripts/rule_schema.json"
Expand Down
2 changes: 1 addition & 1 deletion internal/detectors/openapi/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/bearer/bearer/internal/detectors/openapi/v2json"
"github.com/bearer/bearer/internal/parser/nodeid"
"github.com/bearer/bearer/internal/util/file"
"github.com/ghodss/yaml" // Need to use this as some features use custom JSON unmarshalling
"github.com/rs/zerolog/log"
"golang.org/x/mod/semver"
"sigs.k8s.io/yaml" // Need to use this as some features use custom JSON unmarshalling

"github.com/bearer/bearer/internal/detectors/openapi/v2yaml"
"github.com/bearer/bearer/internal/detectors/openapi/v3json"
Expand Down

0 comments on commit 15c1199

Please sign in to comment.