feat(matrix): PlcSps composite device target (SBOM/CVE/DAST/pentest) (#168)
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 3m51s
CI / Deploy Dashboard (push) Successful in 3m1s
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Successful in 2m9s
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 3m51s
CI / Deploy Dashboard (push) Successful in 3m1s
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Successful in 2m9s
This commit was merged in pull request #168.
This commit is contained in:
@@ -450,37 +450,44 @@ impl PipelineOrchestrator {
|
||||
self.ensure_dast_target(target, &plan).await;
|
||||
|
||||
// PLC control-logic analysis for PLC/SPS targets (a PlcProject artifact).
|
||||
// A PLC/SPS device is a composite target: after the control-logic scan we
|
||||
// fall through so a reachable device (WebVisu / exposed services) still
|
||||
// gets DAST, rather than early-returning on the PLC scan alone.
|
||||
let mut new_count = 0u32;
|
||||
if plan.has(ScanType::PlcControlLogic) {
|
||||
return self.run_plc_scan(target, &target_id, scan_run_id).await;
|
||||
new_count += self.run_plc_scan(target, &target_id, scan_run_id).await?;
|
||||
}
|
||||
|
||||
match target.code_artifact() {
|
||||
Some(code) if code.kind == ArtifactKind::GitRepo => {
|
||||
let repo = RepoView::from_target(target, code);
|
||||
let new_count = self.run_pipeline(&repo, scan_run_id).await?;
|
||||
self.finalize_target(target, &repo, new_count).await?;
|
||||
Ok(new_count)
|
||||
let n = {
|
||||
let repo = RepoView::from_target(target, code);
|
||||
let n = self.run_pipeline(&repo, scan_run_id).await?;
|
||||
self.finalize_target(target, &repo, n).await?;
|
||||
n
|
||||
};
|
||||
new_count += n;
|
||||
}
|
||||
Some(_) => {
|
||||
tracing::warn!(
|
||||
target_id = %target_id,
|
||||
"Unified pipeline: source-archive scanning not yet wired; skipping"
|
||||
);
|
||||
Ok(0)
|
||||
}
|
||||
None => {
|
||||
// No code to scan. Firmware/PLC/mobile static scanners land in
|
||||
// #128/#129/#130; DAST for a running URL still works when a
|
||||
// DastTarget row exists (migrated targets).
|
||||
// No code to scan (a PLC device or a migrated DAST target).
|
||||
// Firmware/mobile static scanners land in #128/#129; DAST for a
|
||||
// running URL works when a DastTarget row exists (provisioned above
|
||||
// from a LiveUrl, or from a migrated target).
|
||||
tracing::info!(
|
||||
target_id = %target_id,
|
||||
"Unified pipeline: no code artifact; attempting DAST only"
|
||||
"Unified pipeline: no code artifact; attempting DAST"
|
||||
);
|
||||
self.update_phase(scan_run_id, "dast_scanning").await;
|
||||
self.maybe_trigger_dast(&target_id, scan_run_id).await;
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
Ok(new_count)
|
||||
}
|
||||
|
||||
/// Analyze a PLC/SPS project (Structured Text / PLCopen XML) for
|
||||
|
||||
Reference in New Issue
Block a user