From 09d2f979d3f882a5d3c80f59969d2cf1ab710f71 Mon Sep 17 00:00:00 2001 From: NxPKG <116948796+NxPKG@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:09:38 +0600 Subject: [PATCH 1/4] Create .gitignore Signed-off-by: NxPKG <116948796+NxPKG@users.noreply.github.com> --- .gitignore | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d357db8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +kube-bench +*.swp +vendor +dist +.vscode/ +hack/kind.test.yaml +coverage.txt + +.idea/ + +# Directory junk file +.DS_Store +thumbs.db +/kubeconfig.kube-bench +/test.data +*.iml From 91f70057fb231ebe952d23a7f7ad485bf24746f2 Mon Sep 17 00:00:00 2001 From: NxPKG <116948796+NxPKG@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:11:04 +0600 Subject: [PATCH 2/4] Create .golangci.yaml Signed-off-by: NxPKG <116948796+NxPKG@users.noreply.github.com> --- .golangci.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .golangci.yaml diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..f8ba09f --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,12 @@ +--- +linters: + disable-all: true + enable: + - deadcode + - gocyclo + - gofmt + - goimports + - govet + - misspell + - typecheck + - varcheck From ac4be817da75d0789980dbd3d7bba6f9fb17e988 Mon Sep 17 00:00:00 2001 From: NxPKG <116948796+NxPKG@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:12:58 +0600 Subject: [PATCH 3/4] Create .goreleaser.yml Signed-off-by: NxPKG <116948796+NxPKG@users.noreply.github.com> --- .goreleaser.yml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..ec38168 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,54 @@ +--- +project_name: kube-bench +env: + - GO111MODULE=on + - KUBEBENCH_CFG=/etc/kube-bench/cfg +builds: + - main: main.go + binary: kube-bench + goos: + - linux + - darwin + goarch: + - amd64 + - arm + - arm64 + - ppc64le + - s390x + goarm: + - 6 + - 7 + ldflags: + - "-X github.com/khulnasoft-lab/kube-bench/cmd.KubeBenchVersion={{.Version}}" + - "-X github.com/khulnasoft-lab/kube-bench/cmd.cfgDir={{.Env.KUBEBENCH_CFG}}" +# Archive customization +archives: + - id: default + format: tar.gz + name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{.Arm }}{{ end }}' + files: + - "cfg/**/*" + - "cfg/config.yaml" +nfpms: + - + vendor: KhulnaSoft Security + description: "The Kubernetes Bench for Security is a Go application that checks whether Kubernetes is deployed according to security best practices" + maintainer: Md Sulaiman + license: Apache-2.0 + homepage: https://github.com/khulnasoft-lab/kube-bench + file_name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{.Arm }}{{ end }}' + contents: + - src: "cfg/**/*" + dst: "/etc/kube-bench/cfg" + - src: "cfg/config.yaml" + dst: "/etc/kube-bench/cfg/config.yaml" + formats: + - deb + - rpm +changelog: + sort: asc + filters: + exclude: + - '^docs' + - '^test' + - '^release' From 489d0d174b6c2b1cd33344772d3a197c98cf1074 Mon Sep 17 00:00:00 2001 From: NxPKG <116948796+NxPKG@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:13:32 +0600 Subject: [PATCH 4/4] Create .yamllint.yaml Signed-off-by: NxPKG <116948796+NxPKG@users.noreply.github.com> --- .yamllint.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .yamllint.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..34c9366 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,6 @@ +--- +extends: default + +rules: + line-length: disable + truthy: disable