Files
AutopilotMonitor/rules
Oliver Kieselbach bd66ad7097 Local Admin Analyzer: allowed accounts carry a role; WsiAccount allowed as standard user
An allowed-list entry is now `name` (any role, meaning unchanged) or
`name|user`: the account is allowed only while it is not a member of the
local Administrators group. Of all entries matching an account, a
standard-user entry wins over one that allows more, so no entry lifts a
built-in restriction. '|' cannot occur in a Windows account name; an older
agent matches such an entry against no account and keeps flagging it.

Built-ins move to Shared (LocalAdminAllowList), one source for agent,
backend and portal: the built-in Administrator (RID 500) in any role;
Guest, DefaultAccount, WDAGUtilityAccount (by RID, any language),
kioskUser0 and the Web sign-in account WsiAccount only as standard users,
like any other account that only carries one of these names;
defaultuser0-2 in any role; Public, Default, Default User and All Users as
profile folders only. The four built-in accounts are decided by RID alone.

Gaps closed on the way:
- Guest-type accounts and accounts named like profile folders were
  allowed as administrators.
- A logged-in user at shutdown allowed a local administrator of that name
  when the WMI inventory failed; the dynamic entry now allows only the
  profile folder.
- Administrators missing from the WMI inventory scored 40 with an empty
  rule summary; they now count as unexpected accounts too (80).
- Glob matching was culture-sensitive (i/I under a Turkish culture).

Event: checks.role_violations, account_details[].rid, allowed_accounts in
canonical form ("Guest|user"). The backend validates entries that are new
against the stored list (grammar, length, forbidden characters, SID, too
broad, duplicate pattern); the too-broad check existed only in the portal.
The portal renders the built-ins from the shared manifest (the hand copy
lacked kioskUser0), offers "Standard user only" per entry and marks
entries the built-ins already cover. ANALYZE-ID-002 1.5.0 explains the
role rule and names the card correctly. Shared grammar cases:
tests/fixtures/local-admin-allow-list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:28:51 +01:00
..