fix: switch kubescape exceptions from alertOnly to disable - #897
Conversation
Kubescape v4.0.13 (released 2026-09-02) bumps opa-utils to v0.0.312, which changes the semantics of `alertOnly` posture exceptions (kubescape/opa-utils#190, kubescape/kubescape#3615). Previously `alertOnly` and `disable` behaved identically and both suppressed a finding. Now `alertOnly` only acknowledges the finding and the resource still counts as failed. The CI workflow runs kubescape/github-action@main with `version: latest` and `severityThreshold: high`, so every chart scan started failing with "compliance result exceeds severity threshold: high" as soon as v4.0.13 was picked up, without any change in this repository. All exceptions in this file were meant to suppress accepted findings, so switch them to `disable`, which is the action upstream now designates for that. Verified locally with kubescape v4.0.13 against all eight charts: every scan passes and compliance scores are identical to the v4.0.12 baseline. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Kubescape configuration changes eight policies from ChangesKubescape exception configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This PR restores the intended suppression behavior for accepted Kubescape findings and updates the related CI configuration. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🟢 Approval recommended
The change is a straightforward, repo-local config update that consistently applies the intended exception action across all existing entries.
Pull request overview
Updates the Kubescape posture exception configuration to preserve the previous “suppress finding” behavior after Kubescape v4.0.13 changed alertOnly semantics, restoring CI stability for Helm chart checks.
Changes:
- Switch all posture exception entries in
.github/kubescape-exceptions.jsonfromactions: ["alertOnly"]toactions: ["disable"]so accepted findings are actually suppressed again.
File summaries
| File | Description |
|---|---|
| .github/kubescape-exceptions.json | Updates Kubescape posture exception actions to disable to match new upstream semantics and stop CI failures. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Changes to .github/kubescape-control.json or .github/kubescape-exceptions.json affect every chart scan, but were not covered by any path filter, so a PR touching only those files skipped the whole "Check Helm Chart" matrix. Add them to the cicd-definitions filter, which already forces a full run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Aug 28 template sync (6428f39) reverted five action pins that renovate had already bumped: actions/checkout v7 -> v2/v3, amannn/action-semantic-pull-request v6 -> v4 and actions/stale v11 -> v4. actionlint (pinned at v1.7.7 in .deps/actionlint.yaml) rejects the old checkout and stale runners, so both the "Validation - GHA Linter" workflow and the "Lint GithubAction files" CI job fail on any PR that touches .github/**. Restore the versions that were in place before the sync. These files are auto-generated from ory/meta; the same change is proposed there so the next sync does not reintroduce the downgrade. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Kubescape v4.0.13 (released 2026-09-02) bumps opa-utils to v0.0.312, which changes the semantics of
alertOnlyposture exceptions (kubescape/opa-utils#190, kubescape/kubescape#3615). PreviouslyalertOnlyanddisablebehaved identically and both suppressed a finding. NowalertOnlyonly acknowledges the finding and the resource still counts as failed.The CI workflow runs
kubescape/github-action@mainwithversion: latestandseverityThreshold: high, so everyCheck Helm Chartjob started failing withcompliance result exceeds severity threshold: highas soon as v4.0.13 was picked up, without any change in this repository. See https://github.com/ory/k8s/actions/runs/33642590257.This PR has three commits:
.github/kubescape-exceptions.jsonwere meant to suppress accepted findings, so this switches them todisable, which is the action upstream now designates for that..github/kubescape-*.jsonwas not covered by any path filter, so a PR touching only the scanner config skipped the wholeCheck Helm Chartmatrix. It is now part of thecicd-definitionsfilter, which forces a full run.actions/checkoutv7 → v2/v3,amannn/action-semantic-pull-requestv6 → v4 andactions/stalev11 → v4. actionlint rejects the oldcheckoutandstalerunners, which made bothValidation - GHA Linterand theLint GithubAction filesCI job fail on any PR touching.github/**. This restores the pre-sync versions. The files are auto-generated from ory/meta, so the same change is proposed at the source in chore: bump action versions in common workflow templates meta#257 to stop the next sync from reintroducing the downgrade. This also covers what chore(deps): update dependency node to v24 #895 does for these four files.Related Issue or Design Document
Fixes the failing CI on
masterand thev0.64.0tag. No issue filed; the bug and reproduction are described above. Companion PR: ory/meta#257.Verification
Ran the exact CI command locally with kubescape v4.0.12 and v4.0.13 against all eight charts in the matrix:
Compliance scores with
disableon v4.0.13 are identical to the v4.0.12 baseline, so nothing is suppressed beyond what the exceptions already covered.With the path filter change, CI on this PR runs the full matrix: all eight
Check Helm Chartjobs pass with kubescape v4.0.13 and the CI scores match the local table. With the action version fix,Validation - GHA LinterandLint GithubAction filespass as well; actionlint 1.7.7 (pinned) and 1.7.12 (latest) both report zero errors locally.Checklist
Further comments
A follow-up worth considering is pinning the
version:input ofkubescape/github-actionso a new upstream release cannot break CI without a change in this repo. Left out of this PR to keep it to the root cause.🤖 Generated with Claude Code