Trivy operator exception unexpected result: empty message instead of removing the check #1742
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
target/kubernetes
Issues relating to kubernetes cluster scanning
What steps did you take and what happened:
Adding exception as OPA policy results in empty messages in reports instead of removing the checks.
Related to aquasecurity/trivy#5679
I have a lot of false positives from KVS116 that requires adding
spec.securityContext
to ConfigMaps, NetworkPolicies and other resources which security context is not applicable to.In an attempt to eliminate those false positives, I tried to add exception for this rule in the. Helm chart. Here is the
values.yaml
:It works fine locally. Tested as described here - works as expected. Using the above Rego file removes the false positives.
When running with trivy operator in live Kubernetes cluster, it re-creates the policies with the only difference - it clears the message from the report.
Before
After
What did you expect to happen:
The check should be missing in reports and metrics.
Environment:
kubectl version
): v1.27.6The text was updated successfully, but these errors were encountered: