feat(controls): B2 — grounded surface checks for absence-based CRA controls (#219)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Failing after 5s
CI / Deploy Dashboard (push) Failing after 4s
CI / Deploy MCP (push) Failing after 5s

This commit was merged in pull request #219.
This commit is contained in:
2026-07-21 12:48:12 +00:00
parent 38fedc661b
commit 4ef257bfe2
7 changed files with 336 additions and 10 deletions
@@ -252,6 +252,31 @@ impl PipelineOrchestrator {
}
}
// Stage 5d: grounded surface checks — the absence-based controls (no
// rate limiting, no security logging, no update-signature check) have no
// syntactic pattern to match, so we retrieve the code surface each governs
// and let the grounded judge decide whether it holds, producing net-new
// findings already tagged + grounded. Gated (default off): absence
// detection is the least deterministic path, kept off until tuned live.
if self.config.breakpilot.grounded_control_checks {
self.update_phase(scan_run_id, "grounded_control_checks")
.await;
let grounded = crate::controls::grounded_surface_findings(
&self.config,
self.llm.clone(),
&repo_path,
&repo_id,
)
.await;
if !grounded.is_empty() {
tracing::info!(
"[{repo_id}] Grounded surface checks raised {} control findings",
grounded.len()
);
all_findings.extend(grounded);
}
}
// Dedup against existing findings and insert new ones
let mut new_count = 0u32;
let mut new_findings: Vec<Finding> = Vec::new();