mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-01-26 23:51:25 +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:
parent
e08e069174
commit
43c1470c0e
@ -60,6 +60,7 @@ type Check struct {
|
|||||||
ID string `yaml:"id" json:"id"`
|
ID string `yaml:"id" json:"id"`
|
||||||
Text string
|
Text string
|
||||||
Audit string `json:"omit"`
|
Audit string `json:"omit"`
|
||||||
|
Type string `json:"type"`
|
||||||
Commands []*exec.Cmd `json:"omit"`
|
Commands []*exec.Cmd `json:"omit"`
|
||||||
Tests *tests `json:"omit"`
|
Tests *tests `json:"omit"`
|
||||||
Set bool `json:"omit"`
|
Set bool `json:"omit"`
|
||||||
@ -70,6 +71,12 @@ type Check struct {
|
|||||||
// Run executes the audit commands specified in a check and outputs
|
// Run executes the audit commands specified in a check and outputs
|
||||||
// the results.
|
// the results.
|
||||||
func (c *Check) Run(verbose bool) {
|
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 out bytes.Buffer
|
||||||
var errmsgs string
|
var errmsgs string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user