You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ci): the Kubescape guard does not count a scan with an interleaved flag or no framework list #4379
Each line below sits in a second run: step beside the real ksail workload scan --framework nsa,mitre --compliance-threshold 95 step. The guard on main (9da24196) accepts every one and reports nsa,mitre, while the line runs a scan of nsa alone that can overwrite the uploaded SARIF.
A root flag between workload and scan (also --experimental, --config=…). Cobra strips flags while it resolves subcommands, so this is the scan command, but every rule looks for workload scan as adjacent words.
U2
ksail workload scan -o kubescape.sarif
A scan with no --framework is skipped rather than counted. It runs ksail's default framework set, which is nsa here because the repo's ksail.yaml sets none, and it writes the uploaded file.
U1 relies on Cobra's stripFlags (reviewed in source). U2 relies on the --framework default of nsa declared by ksail workload scan.
Audience and problem
Same gate as #2823 and #3338: the guard must count every scan that runs, because a reduced scan beside the full one can replace the SARIF that Code Scanning keeps.
Direction
U1: find the subcommand the way Cobra does, skipping flag words between ksail, workload and scan, or refuse any ksail line whose subcommand words are not adjacent.
U2: count an unframed ksail workload scan as an invocation. The step then holds two scans and is refused, and an unframed scan on its own is refused as reading no framework list.
Acceptance criteria
U1 (each root flag) and U2 are refused, each by a test that fails on main.
Controls stay accepted: the real workflows, and ksail --version / ksail workload validate steps beside the scan.
Delivered by merged PR #4431, reviewed source commit 06d951f.
The shared regression table refuses reduced scans with each original interleaved root flag and scans lacking an explicit framework list. Separate positive controls prove full scans with supported interleaved flags are parsed correctly. Version/validation commands beside the scan and the real workflows remain accepted.
Acceptance was checked against the original issue body. The original historical test file is unchanged. All 266 test/subtest assertions passed with race detection, including 28 Bash recording witnesses; the unframed-scan safeguard mutation fails its intended regression. Source CI and protected merge-queue CI passed. Closing as completed.
Activity
chore: agent-claim #4379 nonce=33da421edccbc3a729818dd3db0df63a
chore: agent-claim #4379 nonce=604ff4572dc68ea1c079714e3b2e8675
devantler commentedon Oct 3, 2026
Delivered by merged PR #4431, reviewed source commit 06d951f.
The shared regression table refuses reduced scans with each original interleaved root flag and scans lacking an explicit framework list. Separate positive controls prove full scans with supported interleaved flags are parsed correctly. Version/validation commands beside the scan and the real workflows remain accepted.
Acceptance was checked against the original issue body. The original historical test file is unchanged. All 266 test/subtest assertions passed with race detection, including 28 Bash recording witnesses; the unframed-scan safeguard mutation fails its intended regression. Source CI and protected merge-queue CI passed. Closing as completed.