Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rules:
verbs: ["get", "list", "watch", "create", "update", "patch"]
# RoleBindings (reconcile group access from ProjectSettings)
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings"]
resources: ["roles", "rolebindings"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
Comment on lines 18 to 20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Narrow roles permissions instead of inheriting full rolebindings verbs.

Line 19 fixes the missing roles access, but Line 20 now gives roles the full rolebindings verb set (list/watch/update/patch/delete) even though the provided reconcile path shows get + create for roles. Split this rule so roles has only required verbs, and keep broader verbs on rolebindings.

Suggested RBAC tightening
 - apiGroups: ["rbac.authorization.k8s.io"]
-  resources: ["roles", "rolebindings"]
-  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
+  resources: ["roles"]
+  verbs: ["get", "create", "delete"]
+- apiGroups: ["rbac.authorization.k8s.io"]
+  resources: ["rolebindings"]
+  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]

As per coding guidelines, components/manifests/**/*.yaml: - RBAC must follow least-privilege.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings"]
resources: ["roles", "rolebindings"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles"]
verbs: ["get", "create", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["rolebindings"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/manifests/base/rbac/control-plane-clusterrole.yaml` around lines
18 - 20, The current RBAC rule groups resources "roles" and "rolebindings" under
apiGroups: ["rbac.authorization.k8s.io"] and grants the full verb set; split
this into two rules: one rule for "roles" that only includes the minimal verbs
the reconciler requires (e.g., "get" and "create") and a separate rule for
"rolebindings" that retains the broader verbs
("list","watch","update","patch","delete" as needed). Update the resources/verbs
entries so "roles" no longer inherits the full rolebindings verb set while
keeping rolebindings' permissions unchanged.

# Session runner resources (provision/deprovision per-session workloads in project namespaces)
- apiGroups: [""]
Expand Down
Loading