diff --git a/go.mod b/go.mod index f133907..11f1bcc 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/google/go-cmp v0.5.9 github.com/in-toto/in-toto-golang v0.9.0 github.com/owenrumney/go-sarif v1.1.1 - github.com/sirupsen/logrus v1.9.3 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 7c059c5..d8437a2 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,6 @@ github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LM github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= @@ -49,7 +47,6 @@ golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= diff --git a/pkg/vex/functions_files.go b/pkg/vex/functions_files.go index 998658a..c2b3340 100644 --- a/pkg/vex/functions_files.go +++ b/pkg/vex/functions_files.go @@ -9,12 +9,12 @@ import ( "bytes" "encoding/json" "fmt" + "log/slog" "os" "strings" "time" "github.com/openvex/go-vex/pkg/csaf" - "github.com/sirupsen/logrus" "gopkg.in/yaml.v3" ) @@ -118,7 +118,7 @@ func Open(path string) (*VEX, error) { } if bytes.Contains(data, []byte(`"csaf_version"`)) { - logrus.Info("Abriendo CSAF") + slog.Info("Abriendo CSAF") doc, err := OpenCSAF(path, []string{}) if err != nil { diff --git a/pkg/vex/vex.go b/pkg/vex/vex.go index 19d5733..0aa943b 100644 --- a/pkg/vex/vex.go +++ b/pkg/vex/vex.go @@ -10,6 +10,7 @@ import ( "encoding/json" "fmt" "io" + "log/slog" "os" "sort" "strconv" @@ -17,7 +18,6 @@ import ( "time" "github.com/package-url/packageurl-go" - "github.com/sirupsen/logrus" ) const ( @@ -103,7 +103,7 @@ func New() VEX { now := time.Now() t, err := DateFromEnv() if err != nil { - logrus.Warn(err) + slog.Warn(err.Error()) } if t != nil { now = *t @@ -156,7 +156,7 @@ func (vexDoc *VEX) EffectiveStatement(product, vulnID string) (s *Statement) { // // Deprecated: vex.StatementFromID is deprecated and will be removed in an upcoming version func (vexDoc *VEX) StatementFromID(id string) *Statement { - logrus.Warn("vex.StatementFromID is deprecated and will be removed in an upcoming version") + slog.Warn("vex.StatementFromID is deprecated and will be removed in an upcoming version") for i := range vexDoc.Statements { if string(vexDoc.Statements[i].Vulnerability.Name) == id && len(vexDoc.Statements[i].Products) > 0 { return vexDoc.EffectiveStatement(vexDoc.Statements[i].Products[0].ID, id)