Repository navigation
Conversation
The defender's path puts fixes in the order Microsoft Learn documents: what has to be in place first, what a fix unlocks, and whether the tenant is ready. Steps in a catalogue, a Step attribute on tests, Steps and Goals in the result, readiness checks, and the scoping rules for small runs. The owner accepted every recommendation on 5 November 2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6MVEE835FDFWGSHF0V94C5A
Milestone 1 of the defender's path (docs/proposals/defenders-path.md): - Step on [MaesterTest] (C#, schema table, reader; lowercase, at most three), with the engine DLL rebuilt. - powershell/assets/steps: JSON schema, goals.json and the compliant devices goal with seven steps, each citing Microsoft Learn. - Get-MtStepCatalog reads and checks the catalogue and orders each goal's steps; Get-MtStepProblem reports catalogue errors and unknown steps. The build fails on them and a run warns. - MT.1001, MT.1005, MT.1034, MT.1020, MT.1054 and CIS.M365.4.1 name their steps. Shims must declare the same Step as the test they call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6MVEFN99P17BMSGCRJA73G0
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
This pull request changes files that a website explainer describes:
If the change alters what the explainer shows (a gate, a reason code, a command, a count), update its composition and its chapters in |
Up to standards ✅🟢 Issues
|
PSScriptAnalyzer reads the New- verb of New-Source and New-FakeTest as a state change; both only return a value, as the Frameworks test helpers do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6MVQS27FGKAZD8YTQ1WNS69
LanguageNeutralMicrosoftUrls.Tests.ps1 flags any learn.microsoft.com/en-us URL in tracked source, including the one the step catalogue test uses to check that a locale is reported. Build it from two strings, as the URL test's own cases do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6MX3NQG024P25XBWEHTAJW4
Milestone M6 of the defender's path (docs/proposals/defenders-path.md, section 13). - build/steps/Update-MtLearnMirror.ps1 clones or updates the nine Learn mirrors (blobless) into build/steps/.cache, writes a URL-to-file index from each mirror's .learn-mirror/state.json, and resolves the linked URLs that no mirror has under that key through Learn's redirects. Learn's HEAD answers often leave the redirect out, so each lookup is a headers-only GET, one hop at a time, cached for 30 days. - build/steps/Find-MtStepCandidate.ps1 pulls prerequisite sections and sentences with ordering cues from the pages that check guides and step sources link, with mirror file, line and GitHub link, into a JSON file for review. -SuggestNote (off by default) asks a model for Note text and rejects any that copies the page, is longer than 200 characters or is not one line. - build/steps/Test-MtStepSource.ps1 compares each source's page now with the page at the end of its Reviewed day. Only the body counts: crawls that rewrite front matter on thousands of pages are not changes. Exits 1 when a source needs review and writes the weekly issue's body. - .github/workflows/step-sources.yaml runs it weekly and by hand, and keeps one issue labelled step-sources open while sources need review. contents: read and issues: write only; it never opens pull requests. - powershell/tests/general/StepTooling.Tests.ps1 covers them with a fixture mirror built in TestDrive and fixture Markdown, with no network calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6N01KSW500Y1NVJ7N35ST3M
Milestone 2 of the defender's path (docs/proposals/defenders-path.md, section 15). Every step and relationship was checked against the Learn mirrors (entra, intune and defender) on 2026-11-05. - powershell/assets/steps: 43 steps (entra 27, intune 9, defender 7) in eight goals, with 76 Learn sources and no maintainer-only source. New defender.json. A managed-devices goal joins the seven in the draft. 17 steps are Unchecked, 9 of them naming the Zero Trust checks. - 37 tests name their step. EIDSCA and ORCA tests get Step from their metadata: both generators now emit it, and AF01, AF02, AT01, ORCA.108, ORCA.108.1 and ORCA.235 are regenerated. - Changes from the draft follow Learn. Email steps are defender.*, password writeback is required for user risk only, Windows Hello is one of four phishing-resistant methods, PIM alerts become PIM notifications plus approval, the Defender connection comes before onboarding, and token protection is Windows-only. - Tests that fail Learn's own setup name no step until they are fixed: MT.1013 and CIS 5.2.2.6 reject Require risk remediation, and CISA 7.4 fails permanent emergency access accounts. - Design doc: section 15 rewritten, plus the RequiresOneOf and Not applicable rule (6.2), the licence any-of note (4.4), the "Learn's setup passes" tagging rule (5), and the MT.1098 answer (11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6N0SK1H9MYNYGZA6F2KEAFJ
The owner ruled that a tenant state such as the share of compliant devices
is a data point, not a test: it isn't a misconfiguration, has no real
severity, and must not change pass rates. A step that is a state now names
a measure, "Measure": { "Key": ..., "MinimumShare": ... }, which the
engine reads from Graph for the steps in scope.
- The design doc's readiness checks become measures (sections 1, 3, 4.2,
6.1, 7.2, 8 to 11, 14 to 17).
- powershell/assets/MaesterMeasures.psd1, the measure registry (empty
until the two readers land), read by Get-MtMeasureRegistry.
- The catalogue format and Get-MtStepCatalog accept Measure.
Get-MtStepProblem checks that its key is in the registry and that each
reader exists, and counts a step with a measure as checked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M6N1S7T5HXQ09DVH9VP6TJCC
The two readers of the defender's path measures (design section 11), with their entries in the measure registry. - Get-MtDeviceComplianceShare reads the enabled Entra devices that signed in within 30 days and counts those with isCompliant. The devices that are not compliant, the ones a compliant-device policy would block, are the objects. No License in the registry: an approved third-party MDM can set isCompliant. - Get-MtMfaRegistrationShare reads the whole registration report and counts the member users with isMfaRegistered. It leaves out disabled users, the configured emergency access accounts and the users in their groups, and the directory synchronization accounts. Needs Entra ID P1. The catalogue's Measure entries for intune.devices-compliant and entra.mfa-registered are left to the merge with the M2 catalogue branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6N3XDCV4CV1HJPRTE8CRTKY
# Conflicts: # docs/proposals/defenders-path.md
- intune.devices-compliant and entra.mfa-registered name their measures (MinimumShare 95) and lose their Unchecked text. - devices-compliant declares INTUNE_A: only Intune marks devices compliant, and a compliance partner's devices need Intune licences too. - A registry entry may carry a Caveat, one line on what the figure can't see. Both measures have one. - The MFA measure counts isMfaCapable, so a method the authentication methods policy no longer allows doesn't count. It is now mfa-capable, read by Get-MtMfaCapableShare. - The design doc records the rulings, and notes that readers write object facts only once M3 lists a measure's objects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NVZPGKS1D08P3XAPSFZW13
- Step attribute in Writing native tests, the attribute rubric and the maester-test-expert skill: when a test names a step, the format, the catalogue fields, sources and the build/steps upkeep scripts. - Defender's path concept page (docs/defenders-path/readme.mdx): goals, steps, relationships, statuses, readiness, measures and the -Step, -IncludePrerequisites and Get-MtTest -Step selectors. - scripts/generate-goal-pages.mjs, run by prepare-data.mjs, writes one ignored page per goal from powershell/assets/steps, the measure registry and the test catalog, which now exports Step. Test pages link their steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NX93NTPBFHCTCJR7V9HZA9
… pages The report reads the result's Steps and Goals (section 7.2 of the design) in one typed module, lib/defendersPath.ts, and shows them as written: - Action plan: the defender's path leads the page, with step cards in three groups (Ready now, Check first, Blocked) in Rank order, a lane for each goal in scope, and the ranked list of failures below, blocked ones last with "Blocked by". - Test page: "Before you fix this" lists the prerequisites of the test's step with their status and where it came from (a test in this run, a measure, an earlier run, or not checked), and the command that checks them. How to fix adds the step's rollout and sources. - Overview: a card with the Ready now, Blocked and Check first counts. - A run of one to three tests gets no lanes, only "Before you fix this". A result with no Steps looks as it did. The dev sample gains Steps and Goals (lib/sampleSteps.ts) and ?sample=step, a run of MT.1001 alone. ReportTemplate.html rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NXC4GXJAWKKFDZZV1W0JRN
Steps and Goals in the result (schema 2.2), Step on rows, measures read after the tests with object facts, LastKnown and Earlier, -Step and -IncludePrerequisites, Get-MtTest -Step, and the CSV, Markdown and console outputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NY33BTQ9K915NESBT860E7
…ed-parameter rule for script-block parameters Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NY9JXZ7CVW4STNZCN8E0AX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6NYJPKGV7MM1E2DV77QED78
… as not changing state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6P98WFHMSTQG59BVWJBBNQJ
…t/defenders-path # Conflicts: # report/src/components/report/views.ts # report/src/lib/model.ts # report/src/styles/report.css
earbona23
left a comment
There was a problem hiding this comment.
Read docs/proposals/defenders-path.md end to end. Two things, both small, and I want to be clear first about what I went looking for and did not find, because that is the useful part of a review of a design this careful.
I went hunting for the failure I have been finding all week — a state the run could not read falling on the reassuring side — and the design closes it in four separate places:
- §6.1 keeps Not done, Unknown and Not checked apart and says so explicitly: "Unknown says the run could not tell, Not checked says it did not look, and neither is counted as Not done."
- §4.4: "If a condition cannot be read, for example because Graph is not connected, the step is Unknown, not Not applicable." That is the one that matters most, because §6.2 counts Not applicable prerequisites as met — the rule is only safe because an unreadable condition cannot become Not applicable. I checked that specifically.
- §6.2 takes
RequiresOneOfgroups with a Not applicable member out of the group rather than treating it as met, with the hybrid-join example showing why. - Measures carry a
Caveatfor what the figure cannot see, and a failed gate makes the measure Unknown with the reason code rather than a zero.
Decision 5's rejected alternative — "Only Done and Not done, which turns every gap into a failure" — is the whole argument, settled in one line.
1. §6.2's table and §7.4 disagree about Conflicts
§3 defines a prerequisite as "a step that another step requires, requires one of, or recommends first" — Conflicts is not one. §6.2 then defines readiness as:
| Readiness | Rule |
|---|---|
| Blocked | … or a Conflicts step is Done |
| Unconfirmed | Not blocked, but a prerequisite is Unknown or Not checked |
Read with §3, that leaves a step whose conflicting step is Unknown as Ready. §7.4 says the opposite, and says it correctly: "A conflicting step that is Unknown or Not checked is Unconfirmed. Conflicting steps are in scope (without their own prerequisites), so their status is known."
So the behaviour is right and the normative table is wrong, which is the worse way round for a document that an implementer will quote six months from now. Adding "or a Conflicts step" to the Unconfirmed row, or defining Conflicts into the term, settles it.
It bites nothing today — §15 says the first catalogue has no Conflicts entry, and the obvious one, security defaults, is not checkable until something can tell whether they are off in a Conditional Access tenant. Which is exactly when the table will be read.
2. MinimumShare is scale-free, and here the number it hides is people
Decision 10 puts readiness in a measure with MinimumShare, default 95. A share is the right shape for "is the fleet mostly there". But what the step gates is turning on an enforcing control, and the harm of enabling it early is counted in objects, not in percent:
| devices that signed in | non-compliant at exactly 95% | intune.devices-compliant says |
what enabling the CA policy does |
|---|---|---|---|
| 200 | 10 | Done | 10 people blocked |
| 2,000 | 100 | Done | 100 people blocked |
| 20,000 | 1,000 | Done | 1,000 people blocked |
Same status, same readiness, three very different mornings for a helpdesk. The design already has the number: the reader returns Count, Total and Objects, so Total - Count is free, and the engine keeps up to 100 objects, which means the list is already truncated at a point where the count is what matters.
I would not change the threshold's shape — a percentage is what an admin thinks in. What I would do is one of:
- let
MinimumSharebe joined by an absolute ceiling on the shortfall, so a 20,000-device tenant does not read Ready with 1,000 blocked users waiting; or - if the share alone stays the rule, put the shortfall count in the step's
Measureand in "Before you fix this" with the same prominence as the share, so the status isReady · 95% · 1,000 devices would be blocked.
The second is cheaper and probably enough, because the defender's path is advice rather than a gate — the reader is a person who can be told "ready, and here is what it costs".
I raised the same shape on #2746's Count tolerance, so to be consistent: the argument there was about a tolerance that hides members leaving a group, and this is the mirror of it. If you think the percentage is the right single number in both places, that is a coherent answer and I will stop bringing it up.
Smaller
LastKnown (decision 11) is only read when a step in scope is Not checked, and carries ExecutedAt and File, so the design never claims currency for it — good. The only thing I would watch is the rendering: an Earlier: Done from eleven weeks ago next to a Not checked step reads as reassurance unless the age is as visible as the status. §7.4 says ExecutedAt comes from the newest entry; whether the report shows it is M4's business, and worth a line there.
Nothing above is an argument against shipping this. It is the first design I have read that treats "we could not tell" as a first-class answer in every one of its four layers, and the rank's unlock value — ranking "Enroll devices in Intune" by the controls it enables rather than its own severity — is the part I expect people to notice first.
Draft for Maester 3.1. Main is in the 3.0 code freeze, so this waits until after the release.
What this is
The defender's path puts fixes in the order that Microsoft Learn documents. It shows what has to be in place before a fix works, what each fix unlocks, and whether the tenant is ready for it. Attack-path tools show the route an attacker takes, but none of them show the order a defender has to work in.
The design is in
docs/proposals/defenders-path.md. All 15 decisions in section 17 were accepted on 5 November 2026. Decision 10 changed later that day: readiness is a measure on a step, not a test. Section 7.4 records the choices made while building the engine.This PR holds all seven milestones.
M1: the format and the attribute
Stepon[MaesterTest]: the C# class, the schema table and the reader. Values are stored in lowercase, with at most three per test. The engine DLL is rebuilt, andBuild-MaesterEngine.ps1 -Verifypasses.powershell/assets/steps/holds a JSON schema,goals.jsonand one file per product.Get-MtStepCatalog(internal) reads and checks the catalogue and orders each goal's steps, prerequisites first.Get-MtStepProblem(internal) reports catalogue errors, steps the catalogue doesn't have, and measure keys the registry doesn't have. The module build fails on these problems; a run only warns.Stepas the test it calls (TestShims.Tests.ps1).M2: the first catalogue
Stepfrom their metadata files.Unchecked, and for 9 of those the Zero Trust Assessment pack has a check today.M3: the engine
Step. The result hasStepsandGoals, built byGet-MtResultStep(internal). Each step has a status (Done, Not done, Unknown, Not checked, Not applicable), readiness (Ready, Unconfirmed, Blocked) with what blocks it, a rank, what it unlocks, its tests from the inventory (withNotInRunfor tests that didn't run), its measure, andEarlierwhen an earlier run checked it.Get-MtTestPriority.Measures.EnabledandMeasures.MinimumShare.<key>.Measure. The readers write the device facts anduser.mfaCapable/user.mfaRegistered;user.mfaCapableis added to the shared fact keys.Get-MtPreviousResultgainsLastKnown.Invoke-Maester -Stepand-IncludePrerequisites,Get-MtTest -Step, with tab completion, andSelection.Step/Selection.IncludePrerequisitesin run config.Step,ReadinessandBlockedBycolumns. Partitioned runs rebuildStepsandGoalsfrom the merged rows.SchemaVersionis2.2, documented inresult-schema.md.M4: the report
-IncludePrerequisitescommand. How to fix gains "Roll it out safely".Stepslooks exactly as before. All shape handling is inreport/src/lib/defendersPath.ts; sample data is insampleSteps.ts(?sample=stepfor a one-test run).M5: measures
devices-compliantintune.devices-compliantisCompliantINTUNE_A: only Intune marks devices compliant, and a compliance partner's devices need Intune licences toomfa-capableentra.mfa-registeredisMfaCapable, without guests and the emergency access and sync accountsAAD_PREMIUMThe registry is
powershell/assets/MaesterMeasures.psd1. A measure has no test ID and doesn't affect pass rates or the test count. Each has aCaveatline on what it can't count.M6: keeping the catalogue current
build/steps/holdsUpdate-MtLearnMirror.ps1,Find-MtStepCandidate.ps1andTest-MtStepSource.ps1, which read the nine public Learn mirrors and never write to the catalogue..github/workflows/step-sources.yamlruns every Monday and keeps one issue open while any cited Learn page changed since it was reviewed.M7: docs and site
/docs/defenders-path) and one page per goal (/docs/defenders-path/<goal>), generated byprepare-data.mjsfrom the catalogue at build time and ignored by git.Stepin the writing-tests guide, the attribute rubric and the test expert skill. Each test page links its steps.Notes for review
-Step entra.ca-require-compliant-device -IncludePrerequisitesalso shows lanes for other goals that share the foundation steps, such as risk policies with three of its steps. This follows the design; it may be worth limiting.PermissionNotGranted,MeasureErrorandMeasureOffare new, because tests have no permission gate to borrow a code from.Unchecked, runs only in the unit tests (Get-MtStepProblem -Coverage), because the catalog build also runs on fixture folders.step-sourceslabel itself. The label isn't in.github/labels.jsonyet.Tests
engine/StepCatalog.Tests.ps1,general/StepCatalog.Tests.ps1,MeasureReaders.Tests.ps1,general/StepTooling.Tests.ps1andengine/DefendersPath.Tests.ps1.test-builder.json). After that update, the 1,341 tests in the affected files pass../build/Build-MaesterModule.ps1,npm run buildinreport/(the committed template matches it) andnpm run buildinwebsite/pass.Invoke-Maester -Step entra.ca-require-compliant-device -IncludePrerequisites -SkipGraphConnectwrites schema 2.2 with eight ranked steps. Their statuses are Unknown with reasons such asServiceNotConnectedandNoCheck, never Not done. The HTML report shows them on the Action plan with no console errors.ZeroTrustAssessmentPack.Tests.ps1was left out locally. One of its tests fails when the Zero Trust Assessment module is installed, and running it starts a real assessment against the connected tenant.🤖 Generated with Claude Code