Skip to content
Snippets Groups Projects
Commit e4a89123 authored by Liz Rice's avatar Liz Rice
Browse files

Move message about which config file we’re using into a log at the start

parent 8380ad1e
Branches
Tags
No related merge requests found
...@@ -19,6 +19,7 @@ import ( ...@@ -19,6 +19,7 @@ import (
"io/ioutil" "io/ioutil"
"github.com/aquasecurity/kube-bench/check" "github.com/aquasecurity/kube-bench/check"
"github.com/golang/glog"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
...@@ -54,6 +55,8 @@ func runChecks(t check.NodeType) { ...@@ -54,6 +55,8 @@ func runChecks(t check.NodeType) {
var err error var err error
var typeConf *viper.Viper var typeConf *viper.Viper
glog.V(1).Info(fmt.Sprintf("Using config file: %s\n", viper.ConfigFileUsed()))
switch t { switch t {
case check.MASTER: case check.MASTER:
file = masterFile file = masterFile
...@@ -131,8 +134,6 @@ func colorPrint(state check.State, s string) { ...@@ -131,8 +134,6 @@ func colorPrint(state check.State, s string) {
// prettyPrint outputs the results to stdout in human-readable format // prettyPrint outputs the results to stdout in human-readable format
func prettyPrint(r *check.Controls, summary check.Summary) { func prettyPrint(r *check.Controls, summary check.Summary) {
colorPrint(check.INFO, fmt.Sprintf("Using config file: %s\n", viper.ConfigFileUsed()))
colorPrint(check.INFO, fmt.Sprintf("%s %s\n", r.ID, r.Text)) colorPrint(check.INFO, fmt.Sprintf("%s %s\n", r.ID, r.Text))
for _, g := range r.Groups { for _, g := range r.Groups {
colorPrint(check.INFO, fmt.Sprintf("%s %s\n", g.ID, g.Text)) colorPrint(check.INFO, fmt.Sprintf("%s %s\n", g.ID, g.Text))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment