Why is AVD-KSV-0050 listed as a critical? #9744
Replies: 1 comment 2 replies
-
|
Hi @james-mchugh ! Thank you for the detailed explanation. You are absolutely correct: the Kubernetes API server will not allow creating or binding roles with privileges exceeding those of the current subject without
Currently, the Trivy rule marks any write access to However, from a technical perspective, it would be more accurate to differentiate the cases:
This is a good suggestion for improving the rule, and we can update it to reduce false positives. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
IDs
AVD-KSV-0050
Description
The description of AVD-KSV-0050 appears to indicate that the mere presence of roles or rolebinding permissions in a role is enough to escalate privileges. However, this is not the case. The Kubernetes API prevents roles from being created with more roles than the authorizer unless the authorizer already has
escalatepermissions. Similarly, a role can not be bound to a service account that unless the authorizer has the requested roles or has explicitbindpermissions for the role.Why does Trivy flag the presence of any role/rolebinding permisisons as critical instead of directly flagging uses of escalate, bind, or impersonate? What's even more interesting is that usage of
escalatein verbs is not flagged any differently than other operations, even though that would be a true cause for concern security-wise.I understand it may generally be a good practice to avoid dynamically provisioning roles or rolebindings, such as in an operator for example. However, it seems overkill to list it as a critical issue that can lead to privilege escalation.
Am I missing another concern here around CRUD access to roles/rolebindings?
Thank you!
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Target OS
No response
Debug Output
Version
Checklist
-f jsonthat shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions