-
Notifications
You must be signed in to change notification settings - Fork 320
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
chore: adding cel for psp-root-filesystem #542
chore: adding cel for psp-root-filesystem #542
Conversation
Signed-off-by: Jaydip Gabani <[email protected]>
).map(container, container.name) | ||
validations: | ||
- expression: '(has(request.operation) && request.operation == "UPDATE") || size(variables.badContainers) == 0' | ||
messageExpression: '"only read-only root filesystem container is allowed: " + variabales.badContainers.join(", ")' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables
is misspelled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why didnt CI/tests fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that CEL was returning with the message for not recognizing the misspelled variable, but gator
somehow treated it as violation (which it was expecting for disallow case). And since respective suite.yaml
didn't specify expectation of specific message in case of violation, the error didn't get caught in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the variable and added verification of violation message in suite.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is an error executing messageExpression
, VAP returns a default message instead.
Signed-off-by: Jaydip Gabani <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Which issue(s) does this PR fix (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #541
Special notes for your reviewer: