Skip to content
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

Feature/trivy #60

Merged
merged 13 commits into from
Aug 5, 2021
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
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ require (
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/golang/protobuf v1.5.2
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 // indirect
github.com/google/uuid v1.3.0
github.com/gopherjs/gopherjs v0.0.0-20210420193930-a4630ec28c79 // indirect
github.com/gorilla/mux v1.7.4 // indirect
github.com/iancoleman/strcase v0.2.0
github.com/jackc/pgx/v4 v4.12.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand All @@ -36,7 +34,6 @@ require (
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/swaggo/http-swagger v1.0.0
github.com/urfave/negroni v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
Expand All @@ -137,8 +136,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/form3tech-oss/jwt-go v1.0.3-0.20210625141045-a211650c6ae1 h1:47QZG6unnoYor+ib1NfUNyOPdxG9iTMmTJgwH49yR0g=
github.com/form3tech-oss/jwt-go v1.0.3-0.20210625141045-a211650c6ae1/go.mod h1:0cnZo2pWB3nzM3N7DZ5jkvFyFvrEYHZpaPZwHuajys4=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
Expand Down Expand Up @@ -784,7 +781,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
2 changes: 2 additions & 0 deletions pkg/enums/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
OwaspDependencyCheck Tool = "OwaspDependencyCheck"
DotnetCli Tool = "DotnetCli"
Nancy Tool = "Nancy"
Trivy Tool = "Trivy"
)

func (t Tool) ToString() string {
Expand Down Expand Up @@ -72,5 +73,6 @@ func Values() []Tool {
OwaspDependencyCheck,
DotnetCli,
Nancy,
Trivy,
}
}
6 changes: 4 additions & 2 deletions pkg/enums/tools/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func TestToString(t *testing.T) {
assert.Equal(t, "OwaspDependencyCheck", OwaspDependencyCheck.ToString())
assert.Equal(t, "DotnetCli", DotnetCli.ToString())
assert.Equal(t, "Nancy", Nancy.ToString())
assert.Equal(t, "Trivy", Trivy.ToString())
})
}

Expand All @@ -67,11 +68,12 @@ func TestToLowerCase(t *testing.T) {
assert.Equal(t, "owaspDependencyCheck", OwaspDependencyCheck.ToLowerCamel())
assert.Equal(t, "dotnetCli", DotnetCli.ToLowerCamel())
assert.Equal(t, "nancy", Nancy.ToLowerCamel())
assert.Equal(t, "trivy", Trivy.ToLowerCamel())
})
}

func TestValues(t *testing.T) {
t.Run("should return 20 valid values", func(t *testing.T) {
assert.Len(t, Values(), 20)
t.Run("should return 21 valid values", func(t *testing.T) {
assert.Len(t, Values(), 21)
})
}