From 37dac862e893980f189c1e5415a2b5cd498a89a5 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Thu, 16 Jul 2026 22:36:34 +0200 Subject: [PATCH] feat(onboarding): accept modbus:// and opc.tcp:// live-URL refs The ICS probe targets a device's OT ports (Modbus 502, OPC UA 4840, EtherNet/IP 44818) via the target's LiveUrl artifact. The wizard's client-side validation only accepted http(s):// refs, so a PLC endpoint like modbus://plc:502 was rejected and the probe could never be onboarded. parse_endpoint already understands the modbus:// scheme; this just lets the ref through the wizard. Co-Authored-By: Claude Opus 4.8 --- .../src/infrastructure/onboarding.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compliance-dashboard/src/infrastructure/onboarding.rs b/compliance-dashboard/src/infrastructure/onboarding.rs index 596467e..0e7e5c2 100644 --- a/compliance-dashboard/src/infrastructure/onboarding.rs +++ b/compliance-dashboard/src/infrastructure/onboarding.rs @@ -78,8 +78,16 @@ pub fn validate_artifact_ref(kind: &str, source_ref: &str) -> Option { .then(|| "Enter a git URL — https://…, ssh://…, or git@host:path".to_string()) } "live_url" => { - let ok = (s.starts_with("https://") || s.starts_with("http://")) && no_space; - (!ok).then(|| "Enter an http(s) URL, e.g. https://app.example.com".to_string()) + // http(s) for web/DAST targets; modbus:// and opc.tcp:// for ICS + // devices probed by the ICS probe (e.g. modbus://plc:502). + let ok = (s.starts_with("https://") + || s.starts_with("http://") + || s.starts_with("modbus://") + || s.starts_with("opc.tcp://")) + && no_space; + (!ok).then(|| { + "Enter a URL — https://app.example.com, or modbus://host:502 for a PLC".to_string() + }) } "container_image" => { (!no_space).then(|| "Enter an image ref, e.g. registry/name:tag".to_string())