fix(kubescape): mount scanner config.json dir so posture scans persist#2444
fix(kubescape): mount scanner config.json dir so posture scans persist#2444devantler wants to merge 1 commit into
Conversation
In offline mode the chart mounts the writable `kubescape-volume` emptyDir at the FILE path /home/nonroot/.kubescape/config.json with `subPath: config.json`. emptyDir + subPath makes Kubernetes create the subPath as a DIRECTORY, so config.json is a directory, not a file. The v4.0.8 scanner never wrote it; v4.0.9 (pinned for the CRD-exceptions getter) writes a generated account ID there and now aborts every scan with `open .../config.json: is a directory` before any WorkloadConfigurationScan result is persisted — so posture data froze on 2026-06-27 and ClusterSecurityException posture exceptions are never evaluated (dashboard shows stale findings, exceptions read "0 excluded"). Add a Flux postRenderer that mounts the emptyDir at the .kubescape directory (no subPath) — the same writable layout the chart's online branch uses — so the scanner can create config.json as a file; host-scanner.yaml stays a nested mount. Verified by rendering the chart and applying the patch: the file-path mount is gone. Drop once fixed upstream in kubescape/helm-charts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Closing as a duplicate of #2443, which fixes the same frozen-posture-scan regression more completely. This PR only corrects the Superseded by #2443. |
Why
The cluster's security scanner (Kubescape) has silently stopped producing fresh results — posture/compliance data has been frozen since 27 Jun. Every scan now fails on a broken config-file mount, so the dashboard shows stale findings and the platform's security exceptions never take effect. This surfaced while fixing a real credential finding (dex) — the dashboard couldn't reflect the fix because scanning itself was dead.
What
A small mount correction lets the scanner write its config file again, so daily posture scans persist and exceptions apply. No behaviour or resource change — it only unblocks scanning. Once this deploys and re-scans, the compliance dashboard reflects reality again.
Pairs with (doesn't depend on) the scanner v4.0.9 bump that exposed this, already merged in #2316.