Skip to content

harden RBAC permissions, move them to proper locations - #2629

Open
AndrewChubatiuk wants to merge 1 commit into
masterfrom
harden-rbac
Open

AndrewChubatiuk wants to merge 1 commit into
masterfrom
harden-rbac

Conversation

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor

related issue #2628

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

All reported issues were addressed across 38 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread internal/controller/operator/factory/reconcile/service.go
Comment thread internal/controller/operator/vmagent_controller.go Outdated
Comment thread internal/controller/operator/factory/reconcile/rbac.go
Comment thread internal/controller/operator/factory/reconcile/daemonset.go
Comment thread internal/controller/operator/vlogs_controller.go Outdated
Comment thread internal/controller/operator/vmanomaly_controller.go Outdated
Comment thread internal/controller/operator/vlagent_controller.go Outdated
Comment thread internal/controller/operator/factory/reconcile/configmap.go
Comment thread internal/controller/operator/vmauth_controller.go Outdated
Comment thread internal/controller/operator/vlogs_controller.go Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

All reported issues were addressed across 15 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread internal/controller/operator/vmalertmanager_controller.go Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

1 issue found across 35 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="internal/controller/operator/controllers.go">

<violation number="1" location="internal/controller/operator/controllers.go:324">
P2: The new `+kubebuilder:rbac:groups="",resources=events,verbs=create` marker is attached directly to `createGenericEventForObject` with no blank line, so it becomes the function's doc comment and controller-gen's package-level RBAC collector never reads it. The repository's own `hack/check-rbac-markers.sh` CI gate fails on this line (exit 1). Add a blank line after the marker so it is detached and actually generates the role entry.</violation>
</file>

Comment thread internal/controller/operator/controllers.go

This branch has not been deployed

No deployments
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 this pull request may close these issues.

3 participants