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

Parts of aggregated ClusterRoles are being highlighted as unused #309

Open
jordiprats opened this issue Apr 26, 2024 · 0 comments · May be fixed by #310
Open

Parts of aggregated ClusterRoles are being highlighted as unused #309

jordiprats opened this issue Apr 26, 2024 · 0 comments · May be fixed by #310

Comments

@jordiprats
Copy link




Describe the bug

ClusterRoles that are being aggregated to a another one, they appear unused in the report (POP-400)

To Reproduce

Using

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    rbac.authorization.kubernetes.io/autoupdate: "true"
  name: demo-main
aggregationRule:
  clusterRoleSelectors:
  - matchLabels:
      rbac.authorization.k8s.io/aggregate-to-demo: "true"
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    rbac.authorization.k8s.io/aggregate-to-demo: "true"
  name: demo-part
rules:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - list

Will appear unused, although it's being "used" by the ClusterRole that is being aggregated to (demo-main)

Expected behavior

ClusterRoles that are part of another ClusterRole shouldn't be highlighted

Versions (please complete the following information):

  • Popeye 0.21.3

Additional context
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles

@jordiprats jordiprats linked a pull request Apr 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant