Skip to content

feat(operator): watch security exceptions for rescans#373

Open
AnvayKharb wants to merge 1 commit into
kubescape:mainfrom
AnvayKharb:feat/security-exception-watch
Open

feat(operator): watch security exceptions for rescans#373
AnvayKharb wants to merge 1 commit into
kubescape:mainfrom
AnvayKharb:feat/security-exception-watch

Conversation

@AnvayKharb

Copy link
Copy Markdown

Summary

  • add controller-runtime watcher for SecurityException and ClusterSecurityException
  • debounce updates and trigger targeted rescans via existing dispatcher
  • add expiry sweep and unit tests for queue, reconcile, and expiry behavior

Motivation

Supports GitOps updates to exceptions by triggering rescans when CRDs change or expire. Refs kubescape/kubescape#1982 and https://github.com/kubescape/kubevuln/blob/main/docs/security-exception-design.md

Testing

  • go test ./controllers/...

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@AnvayKharb has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 55 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 64deac23-d644-4b8a-b5fb-0b86dc5c70de

📥 Commits

Reviewing files that changed from the base of the PR and between 37ad382 and 4de140a.

📒 Files selected for processing (7)
  • api/kubescape/v1/groupversion_info.go
  • api/kubescape/v1/securityexception_types.go
  • controllers/cooldownqueue.go
  • controllers/cooldownqueue_test.go
  • controllers/securityexception_watch_handler.go
  • controllers/securityexception_watch_handler_test.go
  • main.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Anvay <anvaykharb007@gmail.com>
@AnvayKharb AnvayKharb force-pushed the feat/security-exception-watch branch from 6adb6ad to 4de140a Compare May 19, 2026 21:02
@matthyx matthyx moved this to Needs Reviewer in KS PRs tracking May 26, 2026
@matthyx

matthyx commented May 27, 2026

Copy link
Copy Markdown
Contributor

thanks @AnvayKharb but I fear it collides with the long term goal of removing watches from our storage component, please check the following PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Reviewer

Development

Successfully merging this pull request may close these issues.

2 participants