feat(security): gate deploys on exploitation risk, not just severity (#1432)

Scan-policy deploy gates can now block on a known-exploited CVE (CISA KEV)
and on a fixable Critical/High finding, in addition to an optional severity
threshold. New policies default risk-first (KEV and fixable on, severity off);
existing policies keep their severity-only behavior. CVSS stays captured for
context but is never the sole basis for a block, and a finding whose
exploitability cannot be confirmed is treated as risky rather than safe
(incomplete scan detail fails closed on KEV/fixable inputs).

The decision logic is shared between the pre-deploy gate and the informational
post-scan banner via a pure helper, so the two never disagree. Block messages
and the block dialog now name the conditions an image matched. Backend and
frontend gates move together, the new inputs replicate across the fleet, and a
blocking policy with no active input is rejected on both sides.
This commit is contained in:
Anso
2026-06-24 20:05:17 -04:00
committed by GitHub
parent bb4ddde35a
commit 6527bc971b
31 changed files with 1259 additions and 127 deletions
+6
View File
@@ -188,6 +188,12 @@ export interface ScanPolicy {
max_severity: VulnSeverity;
block_on_deploy: number;
enabled: number;
/** Block when an image's highest non-suppressed severity meets max_severity. */
block_on_severity: number;
/** Block when any non-suppressed CVE is in the CISA known-exploited (KEV) set. */
block_on_kev: number;
/** Block when any non-suppressed Critical/High finding has a fix available. */
block_on_fixable: number;
replicated_from_control: number;
created_at: number;
updated_at: number;