1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2025-08-02 11:58:28 +00:00

change methodoloy

This commit is contained in:
Laiba Bareera 2025-07-31 19:11:24 +05:00
parent acd4a23605
commit cf9ca5ba75

View File

@ -521,14 +521,14 @@ func getPlatformBenchmarkVersion(platform Platform) string {
glog.V(3).Infof("getPlatformBenchmarkVersion platform: %s", platform) glog.V(3).Infof("getPlatformBenchmarkVersion platform: %s", platform)
switch platform.Name { switch platform.Name {
case "eks": case "eks":
v, err := strconv.ParseFloat(platform.Version, 64) switch platform.Version {
if err == nil { case "1.29", "1.30", "1.31", "1.32", "1.33": // add more if needed
if v < 1.29 { return "eks-1.7.0"
return "eks-1.5.0" case "1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21", "1.22", "1.23", "1.24", "1.25", "1.26", "1.27", "1.28":
} return "eks-1.5.0"
default:
return "eks-1.7.0" return "eks-1.7.0"
} }
return "eks-1.7.0"
case "aks": case "aks":
return "aks-1.7" return "aks-1.7"
case "gke": case "gke":