mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2026-03-01 01:00:22 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d0d8ca993 | ||
|
|
823f3e1064 | ||
|
|
fc72a8a620 |
@@ -209,7 +209,9 @@ func (c *Check) runAuditCommands() (lastCommand string, err error) {
|
||||
|
||||
c.AuditConfigOutput, err = runAudit(c.AuditConfig)
|
||||
// when file not found then error comes as exit status 127
|
||||
if err != nil && strings.Contains(err.Error(), "exit status 127") &&
|
||||
// in some env same error comes as exit status 1
|
||||
if err != nil && (strings.Contains(err.Error(), "exit status 127") ||
|
||||
strings.Contains(err.Error(), "No such file or directory")) &&
|
||||
(c.AuditEnvOutput != "" || c.AuditOutput != "") {
|
||||
// suppress file not found error when there is Audit OR auditEnv output present
|
||||
glog.V(3).Info(err)
|
||||
|
||||
Reference in New Issue
Block a user