Skip to content

ci: ratchet the Kubescape scan threshold toward 100 via ksail workload scan --exceptions (#5369 shipped) #2264

Closed

Description

@devantler

🤖 Generated by the Daily AI Assistant

Context

The CI Kubescape gate (ksail workload scan --framework nsa --compliance-threshold 85 in .github/workflows/ci.yaml) sits below 100 partly because residual findings are runtime-enforced (Kyverno/Cilium) or genuinely unfixable — notably C-0002 (the KubeVirt operator's pods/exec RBAC, which can only be excepted). The platform already maintains ClusterSecurityException CRs for these in k8s/bases/infrastructure/security-exceptions/, but historically the ksail workload scan CLI couldn't consume them.

That blocker is now resolved upstream: native exceptions support shipped in devantler-tech/ksail#5369 (--exceptions / config).

Proposal

  1. Wire the platform's exceptions into the CI scan step: ksail workload scan --framework nsa --exceptions <…> --compliance-threshold <new-floor> (confirm the exact input format the shipped flag expects — kubescape exceptions JSON vs. the ClusterSecurityException CRs in security-exceptions/; adapt/generate as needed).
  2. Read the new stable CI score with exceptions applied (a few merge-queue / PR runs), then ratchet --compliance-threshold up to a floor a few points under it — toward 100 for the genuinely-excepted residual (C-0002 etc.).
  3. Update AGENTS.md (the Validation "threshold" bullets) to reflect the exceptions wiring and the new floor.

Why this is separate from the pin-lift PR

The Kubescape compliance score is environment-dependent and not reproducible offline (documented in AGENTS.md: ≈87% on the Linux CI runner vs ≈94% locally), so the new stable floor can only be established by CI — it can't be validated in a draft locally. Keeping it out of the determinism-pin-lift PR keeps that change clean and CI-verifiable on its own.

Acceptance criteria

  • CI scan step passes the platform's exceptions to ksail workload scan.
  • --compliance-threshold raised to the new observed floor (the excepted residual no longer caps it).
  • AGENTS.md threshold bullets updated and self-consistent.

Filed from a holistic platform↔ksail review (the same review that lifted the 7.65.0 determinism pin once #5371 was resolved).

Activity

  1. devantler commented on Jul 4, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Daily AI Assistant

    Adopted under the Kubescape 100% epic #2447 (the posture-ratchet child). Note: the in-cluster posture scan is currently returning 0.00 across all frameworks because of a broken config.json mount (#2448) — this CI-side ratchet is independent (the CI scan runs in a healthy CLI context), but the two together are what move posture to a real, held 100%.

  2. moved this from 👀 In Review to ✅ Done in 🌊 Project Boardon Jul 14, 2026
  3. botantler-1 commented on Jul 14, 2026

    @botantler-1
    Contributor

    🎉 This issue has been resolved in version 1.117.1 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions