diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1c0f0eb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: go -go: - - 1.17 - -env: - - "PATH=/home/travis/gopath/bin:$PATH" - -services: - - docker - -before_install: - - go get -d golang.org/x/tools/cmd/cover - - go get -d github.com/mattn/goveralls - -script: - - go get -d github.com/golang/mock/mockgen@v1.6.0 - - go install -v github.com/golang/mock/mockgen && export PATH=$GOPATH/bin:$PATH; - - make test_rego_travis - - go generate ./... - - make test_build_travis diff --git a/go.mod b/go.mod index c7abb7b..06d022e 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,9 @@ require ( go.uber.org/dig v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 // indirect golang.org/x/tools v0.1.10 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/go.sum b/go.sum index 835cd65..3531186 100644 --- a/go.sum +++ b/go.sum @@ -492,6 +492,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -697,6 +698,7 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= diff --git a/internal/security/mesh/specutil.go b/internal/security/mesh/specutil.go index 7acb290..56a7ade 100644 --- a/internal/security/mesh/specutil.go +++ b/internal/security/mesh/specutil.go @@ -8,13 +8,17 @@ import ( "strings" ) -const IstioFolder = "istio" +const ( + //IstioFolder constant + IstioFolder = "istio" +) var ( //go:embed istio res embed.FS ) +//LoadIstioSpecs load istio specs func LoadIstioSpecs() ([]utils.FilesInfo, error) { dir, _ := res.ReadDir(IstioFolder) specs := make([]utils.FilesInfo, 0) diff --git a/internal/startup/templates.go b/internal/startup/templates.go index 9360a08..e5cb40f 100644 --- a/internal/startup/templates.go +++ b/internal/startup/templates.go @@ -28,6 +28,7 @@ func GetHelpSynopsis() string { } //SaveSecurityFilesIfNotExist create benchmark audit file if not exist +//nolint:gosec func SaveSecurityFilesIfNotExist(spec, version string, filesData []utils.FilesInfo) error { fm := utils.NewKFolder() folder, err := utils.GetSecurityFolder(spec, version, fm)