diff --git a/.abf.yml b/.abf.yml index abf887a..70fa73a 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - kube-bench-0.7.2.tar.gz: 9489fe0129a47ec3023dd18f363d46c342263617 + kube-bench-0.8.0.tar.gz: b09adeac159cc49c5f187b91805cf9202400479e diff --git a/kube-bench.spec b/kube-bench.spec index b0265db..a7e4b14 100644 --- a/kube-bench.spec +++ b/kube-bench.spec @@ -1,8 +1,9 @@ %define debug %nil %define debug_package %nil +%define secscan 1 Name: kube-bench -Version: 0.7.2 +Version: 0.8.0 Release: 1 Summary: Checks whether Kubernetes URL: https://github.com/aquasecurity/kube-bench @@ -13,6 +14,11 @@ BuildRequires: go BuildRequires: git-core BuildRequires: upx +%if %{secscan} +BuildRequires: clamav +BuildRequires: trivy +%endif + %description kube-bench is a tool that checks whether Kubernetes is deployed securely by running the checks documented in @@ -21,6 +27,11 @@ the CIS Kubernetes Benchmark. %prep %setup -q +%if %{secscan} +clamscan -ir . +trivy fs --scanners vuln --format cosign-vuln . +%endif + %build export GOPROXY=direct CGO_ENABLED=0 go build -ldflags "-X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion=%{version}" -o bin/%{name} . @@ -34,3 +45,11 @@ install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} %doc README.md LICENSE docs %{_bindir}/%{name} +%check +export GOPROXY=direct +#go test ./... + +%if %{secscan} +clamscan -ir %{buildroot} +%endif +