1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-26 01:49:28 +00:00

Merge pull request #101 from aquasecurity/version-fallback2

Use 1.8 tests for k8s 1.9 and 1.10
This commit is contained in:
Liz Rice 2018-04-04 10:54:55 +01:00 committed by GitHub
commit 51212b861f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,8 +48,13 @@ func runChecks(t check.NodeType) {
}
ver := getKubeVersion()
path := filepath.Join(cfgDir, ver)
switch ver {
case "1.9", "1.10":
continueWithError(nil, fmt.Sprintf("No CIS spec for %s - using tests from CIS 1.2.0 spec for Kubernetes 1.8\n", ver))
ver = "1.8"
}
path := filepath.Join(cfgDir, ver)
def := filepath.Join(path, file)
in, err := ioutil.ReadFile(def)