diff --git a/go.mod b/go.mod index 43df999..402bf88 100644 --- a/go.mod +++ b/go.mod @@ -6,13 +6,9 @@ require ( github.com/golang-jwt/jwt/v5 v5.2.2 github.com/hashicorp/go-multierror v1.1.1 github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.12.1 + go.yaml.in/yaml/v3 v3.0.5 gopkg.in/ini.v1 v1.66.2 - gopkg.in/yaml.v3 v3.0.1 ) -require ( - github.com/davecgh/go-spew v1.1.0 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect -) +require github.com/hashicorp/errwrap v1.0.0 // indirect diff --git a/go.sum b/go.sum index d5d04b4..98580b3 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= @@ -8,15 +6,9 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/scanner/config.go b/pkg/scanner/config.go index 1071016..6828384 100644 --- a/pkg/scanner/config.go +++ b/pkg/scanner/config.go @@ -4,7 +4,7 @@ import ( "encoding/json" "io" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" "github.com/DefangLabs/secret-detector/pkg/detectors/artifactory" "github.com/DefangLabs/secret-detector/pkg/detectors/aws" diff --git a/pkg/tests/scanner_test.go b/pkg/tests/scanner_test.go index 3188585..5ee84de 100644 --- a/pkg/tests/scanner_test.go +++ b/pkg/tests/scanner_test.go @@ -31,8 +31,8 @@ import ( "github.com/DefangLabs/secret-detector/pkg/scanner" "github.com/DefangLabs/secret-detector/pkg/secrets" "github.com/stretchr/testify/assert" + "go.yaml.in/yaml/v3" "gopkg.in/ini.v1" - "gopkg.in/yaml.v3" ) const ( diff --git a/pkg/transformers/yamltransformer/yaml_transformer.go b/pkg/transformers/yamltransformer/yaml_transformer.go index ce11bd1..759b4c9 100644 --- a/pkg/transformers/yamltransformer/yaml_transformer.go +++ b/pkg/transformers/yamltransformer/yaml_transformer.go @@ -2,7 +2,7 @@ package yamltransformer import ( "github.com/DefangLabs/secret-detector/pkg/dataformat" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v3" "github.com/DefangLabs/secret-detector/pkg/secrets" "github.com/DefangLabs/secret-detector/pkg/transformers/helpers"