Skip to content

fix(detection): suppress ESC5a false positives for CA host self-permissions - #102

Open
jakehildreth wants to merge 1 commit into
mainfrom
fix/esc5a-ca-host-self-permission
Open

fix(detection): suppress ESC5a false positives for CA host self-permissions#102
jakehildreth wants to merge 1 commit into
mainfrom
fix/esc5a-ca-host-self-permission

Conversation

@jakehildreth

Copy link
Copy Markdown
Owner

What

Suppresses ESC5a false positives where the flagged principal is a CA host's own computer account holding rights on its own CA object (pKIEnrollmentService). Closes #99.

  • Guard added in both Set-DangerousEditor and Set-LowPrivilegeEditor: skip ACEs whose IdentityReference SID equals the object's own ComputerPrincipal (already populated by Set-CAComputerPrincipal earlier in the pipeline via dNSHostName lookup).
  • Suppression scope is own-CA only — a host account with write rights on a different CA object remains a finding.
  • Non-CA objects (templates, containers) unaffected: no ComputerPrincipal, guard is a null check.
  • Module version bumped to 2026.8.191430 (CalVer).

Why

A CA host legitimately needs access to its own CA object — this is normal self-management, so flagging it as a dangerous/low-privilege editor was a false positive (reported by @thedxt, #99). Distinct from #3, which covers inherited expected ACEs (Exchange, Entra Connect).

Fixing at enrichment time rather than in Find-LS2VulnerableObject means all consumers (Find functions, dashboard, risk scoring) get the suppression with one guard per shared function.

Test plan

  • RED → GREEN via TDD: 5 new Set-Editor tests — own-CA ACE suppressed in both functions, other principals on the same CA still flagged, null ComputerPrincipal unaffected.
  • Editor suite: 15/15 pass.
  • Full PS 7 suite: 2394/2426 — 3 failures are New-LS2Dashboard header tests, verified pre-existing against the stashed baseline.

…ssions

- skip ACEs in Set-DangerousEditor/Set-LowPrivilegeEditor where principal SID equals the object's own ComputerPrincipal
- CA host accounts legitimately hold rights on their own CA object; flagging them was a false positive (#99)
- tests: 5 new Set-Editor cases (own-CA suppressed, other principals still flagged, null ComputerPrincipal unaffected)
- bump ModuleVersion to 2026.8.191430; full PS 7 suite green except 3 pre-existing dashboard header failures
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.

ESC5a false positive: CA host computer account rights on its own CA object

1 participant