Skip to content

feat(detection): distinguish CA-shaped schema v1 templates in SchemaV1 findings - #101

Merged
jakehildreth merged 2 commits into
mainfrom
feat/schemav1-ca-template-overrides
Aug 18, 2026
Merged

feat(detection): distinguish CA-shaped schema v1 templates in SchemaV1 findings#101
jakehildreth merged 2 commits into
mainfrom
feat/schemav1-ca-template-overrides

Conversation

@jakehildreth

Copy link
Copy Markdown
Owner

What

Distinguishes CA-shaped schema v1 certificate templates from end-entity schema v1 templates and emits remediation guidance appropriate to each. Closes #98.

  • IsCATemplate property on LS2AdcsObject, populated by new Set-IsCATemplate (pKIDefaultKeySpec -eq 2 / AT_SIGNATURE), wired into the Initialize-AdcsObjectStore template pipeline.
  • Get-IssueTextOverride: generic override mechanism. Any technique may now carry an Overrides array; each entry has a When condition (single property equality) plus alternate IssueTemplate/FixTemplate/RevertTemplate. First match wins; no match falls back to the base technique text.
  • SchemaV1 CAOverride migrated to Overrides as the mechanism's first consumer. CA-shaped templates get leave-in-place guidance — replacing SubCA certificates requires planning and testing, not simple supersession. End-entity templates keep the existing supersession guidance.
  • Placeholder expansion stays branch-local; overrides carry text only.

Why

Supersession has not been observed to work reliably for CA templates in live environments, so recommending it for CA-shaped schema v1 templates was misleading guidance (reported by @thedxt, #98).

Test plan

  • RED → GREEN via TDD: 4 Set-IsCATemplate tests, 6 Get-IssueTextOverride tests, 3 SchemaV1 CA-branch tests.
  • Targeted suites: 637/637 pass in PS 7.
  • Full PS 5.1 suite: 40 failures, all in Set-CA* (PSCertutil mocks) and New-LS2Dashboard (PSWriteHTML) — verified pre-existing by running the baseline tree with changes stashed.

…1 findings

- add IsCATemplate property (pKIDefaultKeySpec -eq 2) via new Set-IsCATemplate, wired into Initialize-AdcsObjectStore
- add Get-IssueTextOverride: generic Overrides mechanism (When property-equality → alternate Issue/Fix/Revert text)
- migrate SchemaV1 CAOverride to Overrides; CA templates get leave-in-place guidance instead of supersession (#98)
- tests: 4 Set-IsCATemplate, 6 Get-IssueTextOverride, 3 SchemaV1 CA-branch; 637/637 pass PS 7 (PS 5.1 failures pre-existing PSCertutil/PSWriteHTML stubs)
@jakehildreth
jakehildreth merged commit f9a2bc2 into main Aug 18, 2026
1 check passed
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.

SchemaV1: don't recommend supersession for CA-shaped templates

1 participant