1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2025-07-08 07:38:21 +00:00

Adding if-condition for eq operator and empty compare value

This commit is contained in:
Arjun Khunti 2023-10-31 16:26:56 +05:30 committed by GitHub
parent 8d38c84713
commit 41e8ecc9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,11 @@ func (t flagTestItem) findValue(s string) (match bool, value string, err error)
if strings.HasPrefix(t.Flag, "--") {
value = "true"
} else {
value = ""
if t.Compare.Op == "eq" {
value = ""
} else {
value = vals[1]
}
}
}
} else {