mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-11-25 01:18:12 +00:00
replace with constant (#1445)
This commit is contained in:
parent
29c8f16167
commit
968ee5814e
@ -24,7 +24,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
yaml "gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
"k8s.io/client-go/util/jsonpath"
|
"k8s.io/client-go/util/jsonpath"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -243,11 +243,11 @@ func (t testItem) evaluate(s string) *testOutput {
|
|||||||
isExist = "does not exist"
|
isExist = "does not exist"
|
||||||
}
|
}
|
||||||
switch t.auditUsed {
|
switch t.auditUsed {
|
||||||
case "auditCommand":
|
case AuditCommand:
|
||||||
glog.V(3).Infof("Flag '%s' %s", t.Flag, isExist)
|
glog.V(3).Infof("Flag '%s' %s", t.Flag, isExist)
|
||||||
case "auditConfig":
|
case AuditConfig:
|
||||||
glog.V(3).Infof("Path '%s' %s", t.Path, isExist)
|
glog.V(3).Infof("Path '%s' %s", t.Path, isExist)
|
||||||
case "auditEnv":
|
case AuditEnv:
|
||||||
glog.V(3).Infof("Env '%s' %s", t.Env, isExist)
|
glog.V(3).Infof("Env '%s' %s", t.Env, isExist)
|
||||||
default:
|
default:
|
||||||
glog.V(3).Infof("Error with identify audit used %s", t.auditUsed)
|
glog.V(3).Infof("Error with identify audit used %s", t.auditUsed)
|
||||||
|
@ -127,7 +127,7 @@ func getConfigFilePath(benchmarkVersion string, filename string) (path string, e
|
|||||||
glog.V(2).Info(fmt.Sprintf("Looking for config specific CIS version %q", benchmarkVersion))
|
glog.V(2).Info(fmt.Sprintf("Looking for config specific CIS version %q", benchmarkVersion))
|
||||||
|
|
||||||
path = filepath.Join(cfgDir, benchmarkVersion)
|
path = filepath.Join(cfgDir, benchmarkVersion)
|
||||||
file := filepath.Join(path, string(filename))
|
file := filepath.Join(path, filename)
|
||||||
glog.V(2).Info(fmt.Sprintf("Looking for file: %s", file))
|
glog.V(2).Info(fmt.Sprintf("Looking for file: %s", file))
|
||||||
|
|
||||||
if _, err := os.Stat(file); err != nil {
|
if _, err := os.Stat(file); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user