-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kube-bench checks are failing in case of the expected value and actual value is empty string. #1515
Comments
@arjunkhunti-crest Please raise a PR with suggested solution |
@chen-keinan, I have raised a PR with a suggested solution. Please find the relevant reference below |
The tentative solution for this issue is to add a new operator that could compare empty values. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
Kube-bench checks are failing when the
flagVal
andcompareValue
are empty strings andflagName
is given.How did you run kube-bench?
What happened?
The check should pass when
flagVal
andcompareValue
are the same (including empty) andflagName
is not empty. However, it is failing with the given parameters. Here’s the reference test for the same:Test Details
Golang Function
Given the parameters provided:
The intention was to compare
flagVal
andcompareVal
("" == ""
). However, there was an internal assignment offlagName
tocompareVal
, resulting in a comparison of"" == "disabledIntegrityMonitoring"
. This unexpected behavior led to a test failure and incorrect outcomes.What did you expect to happen?
The check should pass when
flagVal
andcompareValue
are the same (including empty) andflagName
is not empty.Environment
The text was updated successfully, but these errors were encountered: