falcosecurity / charts

Community managed Helm charts for running Falco with Kubernetes
Apache License 2.0
230 stars 280 forks source link

Helm Chart:Unnecessary RBAC permissions #679

Open Yseona opened 1 month ago

Yseona commented 1 month ago

Description

The bug is that the Deployment event-generator in the charts has too much RBAC permission than it needs. The service account of event-generator is bound to a clusterrole (rbac.yaml#L11) with the following permissions:

After reading the source code of event-generator, I didn't find any Kubernetes API usages using these permissions. Besides, some of these unused permissions may have potential risks. For example, if malicious users gain control of a Kubernetes node running an event-generator pod, they can use the "create deployment" permission to create privileged containers with malicious container images.

Therefore, these permissions should be rechecked to determine if they are truly unnecessary. If they are, the issue should be fixed by removing the unnecessary permissions or or other feasible methods.

To Reproduce

Use helm chart with default values.