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

Merge pull request #281 from yoavAqua/bugfix-no-actual-result

The check's actual result property is now set to be the audit command…
This commit is contained in:
Liz Rice 2019-05-24 13:22:42 +02:00 committed by GitHub
commit 53ef773944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,6 @@ func (t *testItem) execute(s string) *testOutput {
} }
} }
result.actualResult = strings.ToLower(flagVal)
switch t.Compare.Op { switch t.Compare.Op {
case "eq": case "eq":
value := strings.ToLower(flagVal) value := strings.ToLower(flagVal)
@ -232,6 +231,10 @@ func (ts *tests) execute(s string) *testOutput {
finalOutput.testResult = result finalOutput.testResult = result
finalOutput.actualResult = res[0].actualResult finalOutput.actualResult = res[0].actualResult
if finalOutput.actualResult == "" {
finalOutput.actualResult = s
}
return finalOutput return finalOutput
} }