1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-22 06:38:06 +00:00

Add check type manual.

Results of manual checks are forced to WARN to inform users to check manually.
This commit is contained in:
Abubakr-Sadik Nii Nai Davis 2017-08-06 15:29:55 +00:00 committed by Liz Rice
parent 16fbf084e9
commit 09ca739dc0

View File

@ -61,6 +61,7 @@ type Check struct {
ID string `yaml:"id" json:"id"`
Text string
Audit string `json:"omit"`
Type string `json:"type"`
Commands []*exec.Cmd `json:"omit"`
Tests *tests `json:"omit"`
Set bool `json:"omit"`
@ -70,7 +71,13 @@ type Check struct {
// Run executes the audit commands specified in a check and outputs
// the results.
func (c *Check) Run() {
func (c *Check) Run(verbose bool) {
// If check type is manual, force result to WARN.
if c.Type == "manual" {
c.State = WARN
return
}
var out bytes.Buffer
var errmsgs string