pull/537/head^2
Roberto Rojas 4 years ago committed by GitHub
parent 4a07f87e6f
commit 62af68f3f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,6 @@
env:
- GO111MODULE=on
- KUBEBENCH_CFG=/etc/kube-bench/cfg
builds:
- main: main.go
binary: kube-bench
@ -7,14 +8,21 @@ builds:
- linux
goarch:
- amd64
ldflags:
- "-X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion={{.Version}}"
- "-X github.com/aquasecurity/kube-bench/cmd.cfgDir={{.Env.KUBEBENCH_CFG}}"
# Archive customization
archive:
format: tar.gz
files:
- "cfg/**/*"
nfpm:
vendor: Aqua Security
description: "The Kubernetes Bench for Security is a Go application that checks whether Kubernetes is deployed according to security best practices"
license: Apache-2.0
homepage: https://github.com/aquasecurity/kube-bench
files:
"cfg/**/*": "/etc/kube-bench/cfg"
formats:
- deb
- rpm

@ -38,7 +38,7 @@ var (
kubeVersion string
benchmarkVersion string
cfgFile string
cfgDir string
cfgDir = "./cfg/"
jsonFmt bool
junitFmt bool
pgSQL bool
@ -145,7 +145,7 @@ func init() {
`Run all the checks under this comma-delimited list of groups. Example --group="1.1"`,
)
RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is ./cfg/config.yaml)")
RootCmd.PersistentFlags().StringVarP(&cfgDir, "config-dir", "D", "./cfg/", "config directory")
RootCmd.PersistentFlags().StringVarP(&cfgDir, "config-dir", "D", cfgDir, "config directory")
RootCmd.PersistentFlags().StringVar(&kubeVersion, "version", "", "Manually specify Kubernetes version, automatically detected if unset")
RootCmd.PersistentFlags().StringVar(&benchmarkVersion, "benchmark", "", "Manually specify CIS benchmark version. It would be an error to specify both --version and --benchmark flags")

Loading…
Cancel
Save