mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-22 14:48:07 +00:00
Fix version check regexp.
This commit is contained in:
parent
c60c459bc4
commit
c93c94b3f6
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user