1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-22 08:08:07 +00:00

Fix version check regexp.

This commit is contained in:
Abubakr-Sadik Nii Nai Davis 2017-11-21 12:20:02 +00:00
parent c60c459bc4
commit c93c94b3f6

View File

@ -234,7 +234,7 @@ func getKubeVersion() string {
subs := serverVersionRe.FindStringSubmatch(string(out))
if len(subs) == 2 {
ver = string(subs[1])
validVersionPttn := `\d.\d`
validVersionPttn := `\d.\d.\d`
if matched, _ = regexp.MatchString(validVersionPttn, ver); !matched {
continueWithError(fmt.Errorf("%s: invalid server version ", ver), failmsg)
}