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

Patch 1 #39

Merged
merged 4 commits into from
Oct 31, 2023
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
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
linters:
disable-all: true
enable:
- deadcode
- gocyclo
- gofmt
- goimports
- govet
- misspell
- typecheck
- varcheck
54 changes: 54 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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'
6 changes: 6 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
extends: default

rules:
line-length: disable
truthy: disable
Loading