Replies: 7 comments 2 replies
-
I think there is an issue in the underlying policy. To illustrate:
this test succeeds but
fails (ignore the test name) . It succeeds if the count is condition checks for a value of 2. I looked into the two policies and they are implemented in a significantly different way. I am a rego newbie so can't really comment on what is wrong in the allowPrivilegeEscalation policy. |
Beta Was this translation helpful? Give feedback.
-
@nikpivkin @simar7 is this a bug in the policy, does trivy use the policies as defined in the trivy-policies repo? |
Beta Was this translation helpful? Give feedback.
-
cc @chen-keinan |
Beta Was this translation helpful? Give feedback.
-
Can anybody comment on this? I've provided a clear test case. |
Beta Was this translation helpful? Give feedback.
-
Hi @pfrydids ! I created issue #6232 /cc @chen-keinan |
Beta Was this translation helpful? Give feedback.
-
@nikpivkin thanks for the PR. Just wondered what the relationship between this repo and a particular version of the If I run I get
Can I relate any of this information to a commit in this repo? |
Beta Was this translation helpful? Give feedback.
-
@simar7 Have tested and can confirm that the updated policy has resolved the issue - many thanks |
Beta Was this translation helpful? Give feedback.
-
Description
I have deployed version 2.26.0 of the ebs-csi-node helm chart.
trivy k8s daemonset/ebs-csi-node -n kube-system --compliance=k8s-nsa --report all | grep allowPrivilegeEscalation
results in
Which I think is due to it not differentiating between containers (only 1 container allows privilege escalation).
The net result is a compliance report which is reporting far to many violations.
I have focused on the allowPrivilegeEscalation but I think it applies to many others.
Desired Behavior
The command to return
Actual Behavior
Reproduction Steps
1. create an EKS cluster 2. helm repo add aws-ebs-csi-driver https://kubernetes-sigs.github.io/aws-ebs-csi-driver 3. helm repo update 3. helm upgrade --install aws-ebs-csi-driver \ --namespace kube-system \ aws-ebs-csi-driver/aws-ebs-csi-driver 4. trivy k8s daemonset/ebs-csi-node -n kube-system --compliance=k8s-nsa --report all | grep allowPrivilegeEscalation ...
Target
Kubernetes
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
Linux
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions