diff --git a/compliance-agent/src/pipeline/plc/rules.rs b/compliance-agent/src/pipeline/plc/rules.rs index 700f097..bf1eefd 100644 --- a/compliance-agent/src/pipeline/plc/rules.rs +++ b/compliance-agent/src/pipeline/plc/rules.rs @@ -395,9 +395,9 @@ fn check_safety_bypass(target: &Expr, value: &Expr, line: u32, pou: &str, hits: .iter() .any(|h| n.contains(h)); let watchdog = n.contains("watchdog") || n.contains("wdt"); - let disabling = matches!(value, Expr::Bool(false, _)) - || matches!(value, Expr::Int(0, _)) - || (watchdog && matches!(value, Expr::Int(0, _))); + // A safety enable / interlock / watchdog signal driven to FALSE or 0 in + // application logic is a bypass (e.g. `Safety_Enable := FALSE`, `Watchdog_Kick := 0`). + let disabling = matches!(value, Expr::Bool(false, _)) || matches!(value, Expr::Int(0, _)); if (safety || watchdog) && disabling { hits.push(RuleHit { line,