fix(security): enforce template locks on native alarm source overrides at flatten and management-command level

Add IsLocked to ResolvedNativeAlarmSource; FlatteningService skips overrides on a
locked source (mirrors attribute/alarm lock rules); ManagementActor SetInstanceNativeAlarmSourceOverride
flattens the instance and rejects an override on a locked source (and rejects a
canonical name that does not resolve, preventing dangling overrides).

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-09 16:28:52 -04:00
parent ab6077708f
commit 57f7f65772
6 changed files with 109 additions and 3 deletions
@@ -146,6 +146,12 @@ public sealed record ResolvedNativeAlarmSource
public string? ConditionFilter { get; init; }
/// <summary>Gets the source of this binding: "Template", "Inherited", "Composed", or "Override".</summary>
public string Source { get; init; } = "Template";
/// <summary>
/// Gets whether this native alarm source is locked at the template level. A locked
/// source cannot be repointed by an instance override — mirrors the attribute/alarm
/// lock semantics.
/// </summary>
public bool IsLocked { get; init; }
}
/// <summary>