fix(scan): a target known only by its Siemens controllers is matched

A PLC target without a project file took the no-code path and never
persisted its device entries, so its controllers raised no CVE alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-28 12:30:29 +01:00
1 parent 5800e0fab3
commit 4d6737a9d7
1 file changed
+13
@@ -1925,6 +1925,19 @@ impl PipelineOrchestrator {
.await?;
}
None => {
// A control application known only by the Siemens controllers
// it runs on (SPS item 4a): they are its SBOM, matched against
// Siemens' advisories as with a project.
if !target.devices.is_empty() {
let devices =
crate::pipeline::sbom::devices::entries(&target.devices, &target_id);
if let Err(e) = self
.persist_control_app_sbom(target, &target_id, scan_run_id, devices)
.await
{
tracing::warn!(target_id = %target_id, error = %e, "device SBOM persist failed");
}
}
// No code to scan. DAST is attempted for a target the matrix
// plans it for, and for a migrated DAST target, which carries no
// artifacts at all and relies on its DastTarget row. Anywhere