Repository navigation
feat(kubescape): fail CI when a namespace leaves scan coverage unreviewed - #4179
Conversation
…ewed Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f6ab232f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…elease An overlay patch, JSON6902 op, inline kustomization patch or valuesFrom that sets excludeNamespaces would narrow the deployed scan scope while the guard kept reading the unchanged base. Fail on any of them; five RED cases, ablation fired. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai review |
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-08-10T13:01:12.782ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthroughThe change adds a guard that checks Kubescape’s configured Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The identified bypass cannot change the deployed scan scope without being caught. No actionable merge-blocking issue remains after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new check makes excluded namespaces subject to a documented review process without changing what Kubescape scans. Its effectiveness still depends on the CI check and repository review protections being enforced. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The changes implement the coverage guard for issue Resolution Provide reviewable evidence for Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (2 skipped: 2 unsupported.) 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. Comment |
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f49eaa18dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…spellings Kustomize replacements (and other generators) can set excludeNamespaces without any spelling the text checks name. Render every provider controllers layer and require any kubescape HelmRelease in it to carry exactly the base scope with no valuesFrom; also reject Flux Kustomization spec.patches touching the scope. Fails closed when no provider renders the release. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai review |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Readiness at
|
Why
The security score only covers the namespaces the scanner is allowed to look at. A namespace can be dropped from that set with a one-word edit, and nothing would say so: the score looks exactly as if the namespace were clean. That includes the scanner's own namespace.
What
Keeps a reviewed list of every namespace the scanner skips, each with the reason, and fails CI when the scanner's actual exclusions differ from that list in either direction. Leaving scan coverage now takes a visible, reviewed change with a written reason. What gets scanned is unchanged.
Fixes #3215