Skip to content
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

Helm Chart:Unnecessary RBAC permissions #679

Open
Yseona opened this issue May 29, 2024 · 3 comments
Open

Helm Chart:Unnecessary RBAC permissions #679

Yseona opened this issue May 29, 2024 · 3 comments
Assignees
Labels
kind/bug Something isn't working lifecycle/rotten

Comments

@Yseona
Copy link

Yseona commented May 29, 2024

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:

  • create/delete verb of the deployments/pods/services resource (ClusterRole)
  • get verb of the secrets resource (ClusterRole)

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.

@Yseona Yseona added the kind/bug Something isn't working label May 29, 2024
@poiana
Copy link
Contributor

poiana commented Aug 27, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@leogr
Copy link
Member

leogr commented Aug 28, 2024

Hey, sorry for the very late response 😓

IIRC, those permissions are needed since the event-generator can create a fake activity for the K8s Audit Log 👇
https://github.com/falcosecurity/event-generator/tree/main/events/k8saudit/yaml
These resources ☝️ need relevant RBAC permissions to be applied.

@leogr leogr self-assigned this Aug 28, 2024
@poiana
Copy link
Contributor

poiana commented Sep 27, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working lifecycle/rotten
Projects
None yet
Development

No branches or pull requests

3 participants