Skip to content

Harden by-name server resolution in Apply-Fix confirm (B3 LOW-2)#1034

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/b3-low2-byname-hardening
May 31, 2026
Merged

Harden by-name server resolution in Apply-Fix confirm (B3 LOW-2)#1034
erikdarlingdata merged 1 commit into
devfrom
feature/b3-low2-byname-hardening

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Closes the LOW-2 residual from the PR-B security review (#1033): a finding whose persisted ServerId is the analysis int-id fallback can resolve to a different server by unique-name match if that server was renamed/replaced between the alert and the apply.

PR-B mitigated this with a "resolved by name — verify the server" banner + exact target display + reversible un-apply. This change closes the reflexive-click path:

  • On ResolvedByName, the confirm dialog removes the Enter-key default (ConfirmButton.IsDefault = false).
  • When Apply would otherwise be enabled, it requires an explicit "I confirm this is the correct target server" checkbox before enabling Apply.
  • Strictly more restrictive: the audit-table-absent and not-actionable hard-blocks are unaffected (checkbox stays collapsed, button stays disabled). The non-by-name path is unchanged (keeps Enter-to-confirm).

Dashboard.Tests 84/0, build clean (0 warnings, CS4014-as-error). UI-window click behavior isn't unit-tested (consistent with the codebase — no WPF window tests); the gating logic is additive friction and a human spot-click of the by-name case is worthwhile.

🤖 Generated with Claude Code

When a finding's source server is resolved by NAME (the alert carried the
int-id fallback and a unique name matched), a server renamed/replaced since
the alert could be a different target. PR-B mitigated this with a warning
banner + exact-target display; this closes the click-through risk: on
ResolvedByName the confirm dialog removes the Enter-key default and, when
Apply would otherwise be enabled, requires an explicit "I confirm this is the
correct target server" checkbox before enabling Apply. Strictly more
restrictive — the audit-absent / not-actionable hard-blocks are unaffected
(checkbox stays collapsed, button stays disabled). Dashboard 84/0, build clean.

Fast-follow from the PR-B security review (LOW-2); user chose land-Phase-1-then-harden.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit d895921 into dev May 31, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/b3-low2-byname-hardening branch May 31, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant