Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6c57f84
docs(proposals): design the defender's path
merill Nov 5, 2026
2cd2759
feat(engine): add the Step attribute and the step catalogue
merill Nov 5, 2026
b95fee8
test(engine): mark the step catalogue test helpers as not changing state
merill Nov 5, 2026
a75e553
test(engine): split the locale URL in the step catalogue fixture
merill Nov 5, 2026
1b08f09
feat(build): add the tooling that keeps the step catalogue current
merill Nov 5, 2026
7551ef1
feat(engine): add the defender's path catalogue for eight goals
merill Nov 5, 2026
39c31c9
feat(engine): make readiness a measure on the step, not a test
merill Nov 5, 2026
5bbba98
feat(engine): add the devices-compliant and mfa-registered measures
merill Nov 5, 2026
375137a
Merge the M2 catalogue into feat/defenders-path
merill Nov 5, 2026
e847de0
Merge the M6 catalogue tooling into feat/defenders-path
merill Nov 5, 2026
99f81c8
feat(engine): put the measures on their steps, with the owner's rulings
merill Nov 5, 2026
0892f4f
Merge branch 'main' into feat/defenders-path
merill Nov 5, 2026
3c34897
Merge remote-tracking branch 'origin/main' into feat/defenders-path
merill Nov 5, 2026
3dd9585
docs(site): document the defender's path and build a page per goal (M7)
merill Nov 5, 2026
df526a2
feat(report): show the defender's path in the action plan and on test…
merill Nov 5, 2026
8324618
feat(engine): build the defender's path into the result (M3)
merill Nov 5, 2026
b80651f
Merge M3, the defender's path engine
merill Nov 5, 2026
70ba879
fix(engine): read each step's rank in the test, and suppress the unus…
merill Nov 5, 2026
b557926
Merge M4, the defender's path in the report
merill Nov 5, 2026
bf60e90
Merge M7, the defender's path docs and goal pages
merill Nov 5, 2026
7934735
chore(website): regenerate the test builder data
merill Nov 5, 2026
891ed85
Merge remote-tracking branch 'origin/feat/defenders-path' into feat/d…
merill Nov 5, 2026
1039e92
test(engine): call New-Row with named parameters and mark New-Context…
merill Nov 5, 2026
0b7d8aa
Merge branch 'main' of https://github.com/maester365/maester into fea…
merill Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/skills/maester-test-expert/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ in [Choosing the attribute values](#choosing-the-attribute-values).
| `ImplementationCost` | string | `Low`, `Medium`, `High` | Yes, unless `Severity` is `Info` | Leave it out of an `Info` check. |
| `Mitre` | string[] | ATT&CK technique IDs (`T1110`, `T1110.003`), or the single value `None` | Yes | At most five. Never a technique beside one of its own sub-techniques. |
| `Control` | string[] | `<framework-key>:<requirement-id>` | CIS, CISA and ASD checks | The requirements the check implements or supports. A CIS check sets `Control = 'cis-m365:5.1.5.1'`, a CISA check `Control = 'cisa-scuba:MS.AAD.3.1'`, an ASD check `Control = 'essential-eight:ISM-1504'`; any other check may name the same requirements. The first one that a framework file knows becomes the `Benchmark` of the result. For a shipped framework the requirement must exist in its file. |
| `Step` | string[] | Step IDs `<product>.<name>` from `powershell/assets/steps` | No | The steps of the defender's path the check verifies, at most three. See [Steps of the defender's path](#steps-of-the-defenders-path-step). |
| `Service` | string[] | `Graph`, `Azure`, `ExchangeOnline`, `SecurityCompliance`, `SharePointOnline`, `Teams`, `Dataverse`, `AzureDevOps`, `GitHub`, `ActiveDirectory`, or `None` | Yes | All listed must be connected. Registry: `powershell/assets/MaesterServiceRegistry.psd1`. |
| `License` | string[] | Tokens from `powershell/assets/MaesterLicenseTable.psd1`; `A&B` = both | No | Tenant needs any one element. |
| `Permission` | string[] | `<Service>:<Kind>:<Name>`; `\|` joins alternatives | No | The permissions the check needs, for example `'Graph:Scope:Policy.Read.All'`. Every element is needed; inside an element any one alternative is enough, least privileged first. The service must be in `Service`, the kind one the service registry lists for it. Recorded; not enforced in 3.0. See "Permission" in `website/docs/writing-tests/index.mdx`. |
Expand Down Expand Up @@ -411,6 +412,23 @@ only when nothing applies. It is the only way a check is mapped to a framework.
The first value that names a requirement in a framework file becomes the `Benchmark` of the result, so the order
matters. An inventory count, or a health, licensing or tidiness check, usually lists nothing.

### Steps of the defender's path (`Step`)

`Step` names the steps of the defender's path a check verifies: one change or one tenant state from the step
catalogue (`powershell/assets/steps/<product>.json`), such as `entra.ca-require-compliant-device`. The catalogue
says what has to be done before each step, citing Microsoft Learn. Look for a step whenever a check is about a
change that Learn says needs something else in place first.

- Name a step only when a tenant set up the way the step's Learn sources describe passes the check. A check that
rejects a control Learn now recommends names no step until it is fixed.
- Checks with different definitions of done name different steps, even when they read the same setting. Checks in
different suites that test the same thing name the same step.
- At most three. A built-in check names only steps that are in the catalogue; add a new step there, in Maester's own
words with a Learn URL without a locale, `Reviewed`, and `Unchecked` or `Measure` where they apply, in the same pull
request.
- Rules and the catalogue format: "Step" in `website/docs/writing-tests/index.mdx` and the Step section of the
attribute rubric. `Get-MtTest -Step <id>` lists the checks that already name a step.

### A requirement another suite already checks (shims)

Benchmarks overlap: CIS, CISA, ASD and Maester tests often read the same setting. Before writing a check for a
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/step-sources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Checks the Microsoft Learn pages that the defender's path catalogue cites (powershell/assets/steps) against the
# Learn mirrors, and keeps one issue open (labelled step-sources) that lists the steps whose sources changed since
# a maintainer last reviewed them, with a link to each change. Every run updates that issue; it is closed when every
# source is current again, and the next change opens a new one. The workflow never opens pull requests: a maintainer
# re-reads each page, updates the step if Learn changed the order, and sets the source's Reviewed date.
# See build/steps/README.md.
name: step-sources

on:
workflow_dispatch:
schedule:
- cron: '41 5 * * 1'

permissions: {}

concurrency:
group: step-sources
cancel-in-progress: false

env:
SOURCES_LABEL: step-sources
SOURCES_TITLE: "Defender's path: step sources changed on Microsoft Learn"

jobs:
step-sources:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
issues: write

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
build/steps
powershell/assets/steps

- name: Update the Learn mirrors
shell: pwsh
run: ./build/steps/Update-MtLearnMirror.ps1 -Links Catalog | Out-Null

- name: Check the step sources
id: check
shell: pwsh
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
$out = Join-Path $env:RUNNER_TEMP 'step-sources'
$null = ./build/steps/Test-MtStepSource.ps1 -OutputPath $out
$code = $LASTEXITCODE
if ($code -notin 0, 1) { throw "Test-MtStepSource.ps1 could not check the sources (exit code $code)." }
# An issue body holds at most 65,536 characters. A longer report is cut at a line and points to the artifact.
$body = (Get-Content -LiteralPath (Join-Path $out 'step-sources.md') -Raw).TrimEnd()
$footer = "`n`nFrom [this run]($env:RUN_URL) of the step-sources workflow."
if ($body.Length -gt 60000) {
$body = $body.Substring(0, $body.LastIndexOf("`n", 60000)) + "`n`nThe list is cut short here. The step-sources artifact of the run has all of it."
}
Set-Content -LiteralPath (Join-Path $env:RUNNER_TEMP 'step-sources-issue.md') -Value ($body + $footer) -Encoding utf8NoBOM
"needs-review=$(if ($code -eq 1) { 'true' } else { 'false' })" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
# Sources that need review are reported in the issue, not as a failed run.
exit 0

- name: Keep the report
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: step-sources
path: ${{ runner.temp }}/step-sources/
retention-days: 30

- name: Open, update or close the step sources issue
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
NEEDS_REVIEW: ${{ steps.check.outputs.needs-review }}
run: |
set -euo pipefail
body="$RUNNER_TEMP/step-sources-issue.md"
issue=$(gh issue list --label "$SOURCES_LABEL" --state open --limit 1 --json number --jq '.[0].number // empty')
if [ "$NEEDS_REVIEW" = "true" ]; then
if [ -n "$issue" ]; then
gh issue edit "$issue" --body-file "$body"
echo "Updated issue #$issue."
else
gh label create "$SOURCES_LABEL" --color c5def5 --description "A Learn page that the step catalogue cites changed" --force
url=$(gh issue create --title "$SOURCES_TITLE" --body-file "$body" --label "$SOURCES_LABEL")
echo "Opened ${url}."
fi
elif [ -n "$issue" ]; then
gh issue edit "$issue" --body-file "$body"
gh issue close "$issue" --reason completed --comment "Every step source matches the page it was reviewed against. The next change opens a new issue."
echo "Closed issue #$issue."
else
echo "Every step source matches the page it was reviewed against."
fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -571,3 +571,7 @@ website/src/data/sponsors.json
website/public/readme/
website/docs/commands/*.mdx
!website/docs/commands/readme.mdx
website/docs/defenders-path/*.md

# Learn mirror clones and the step tooling's index (build/steps/Update-MtLearnMirror.ps1)
build/steps/.cache/
5 changes: 5 additions & 0 deletions build/Build-MaesterModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,9 @@ foreach ($MarkdownFile in $MarkdownFiles) {
# <framework-key>:<control-id>, on a framework key that two suites declare, and on a test whose Control
# names one of these frameworks and a requirement its file does not have. A test's Benchmark in the
# catalog is the requirement its Control names, with the facts the framework file holds about it.
# It fails too on a problem in the step catalogue (powershell/assets/steps) and on a test or pack that names a
# step the catalogue does not have. Whether every step is named by a test is a unit test (StepCatalog.Tests.ps1),
# because the build may be given a folder that holds only some of the tests.
# The source module is imported in a separate runspace, so the caller's session (which may itself have
# Maester loaded, as in the module's own tests) is not changed.
$CatalogResult = [pscustomobject]@{ Tests = @(); Problems = @(); Suites = @{}; Version = $SourceManifest.ModuleVersion; GraphScope = @(); Taxonomy = $null }
Expand All @@ -715,6 +718,8 @@ if ($NativeTestFiles.Count -gt 0) { $CatalogRunspace = [powershell]::Create(); t
foreach ($message in @(Get-MtAttackTechniqueProblem -Mitre $t.Mitre)) { "$($t.File): $message" }
}
$problems = @($problems) + @(Get-MtFrameworkProblem -Test $tests -Root $TestsRoot)
# The step catalogue of the defender's path, and the steps the tests and the packs name.
$problems = @($problems) + @(Get-MtStepProblem -Test $tests -PackRoot (Join-Path (Split-Path -Path $TestsRoot -Parent) 'packs'))
$suites = @{}
foreach ($manifest in Get-ChildItem -Path $TestsRoot -Filter 'suite.json' -Recurse -File) {
$suite = Get-Content -LiteralPath $manifest.FullName -Raw | ConvertFrom-Json
Expand Down
4 changes: 3 additions & 1 deletion build/docs/Export-MtTestCatalogForDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
A test of a suite that implements a published benchmark also has Benchmark, from the framework file of its
suite (tests/<suite>/frameworks/<key>.json): Framework, Version, Requirement and the requirement's own
facts, such as the CIS level and profiles. Its Control lists the controls of other frameworks that the
requirement relates to. Benchmark is null for every other test. Frameworks at the top level gives the Name,
requirement relates to. Benchmark is null for every other test. Step lists the steps of the defender's path
the test verifies (powershell/assets/steps), which the goal pages of the site list. Frameworks at the top level gives the Name,
Version and Url of each framework by Key.

Packs lists the packs that ship with Maester (packs/<name>/maester-pack.json) with the tests of their catalog,
Expand Down Expand Up @@ -88,6 +89,7 @@ $catalog = foreach ($t in $sorted) {
ImplementationCost = if ($t.ImplementationCost) { "$($t.ImplementationCost)" } else { '' }
Mitre = ConvertTo-StringArray $t.Mitre
Control = ConvertTo-StringArray $t.Control
Step = ConvertTo-StringArray $t.Step
Benchmark = $t.Benchmark
Service = ConvertTo-StringArray $t.Service
License = ConvertTo-StringArray $t.License
Expand Down
6 changes: 4 additions & 2 deletions build/eidsca/Update-EidscaTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
files exactly. CI reruns it and fails on drift (powershell/tests/general/EidscaGenerator.Tests.ps1).
Severity comes from the EIDSCA config, which is the source of truth for it. The Maester classification attributes
that the EIDSCA config does not carry (RelatedProduct, Feature, Area, ResourceType, UserImpact, ImplementationCost,
Mitre and Control) come from eidsca-test-metadata.json and Author/Contributor from the authorship seed (design
Mitre, Control and Step) come from eidsca-test-metadata.json and Author/Contributor from the authorship seed (design
section 11), so regeneration keeps them. Edit the metadata file, never the generated tests. A check without a
metadata row is generated with a warning and fails the attribute unit tests until the row is added.

Expand Down Expand Up @@ -51,7 +51,7 @@ param (
[string] $PageTitleCachePath = "$PSScriptRoot/PageTitles.json",

# Maester classification of each check that the EIDSCA config does not carry: TestSettings rows with Id and the
# RelatedProduct, Feature, Area, ResourceType, UserImpact, ImplementationCost, Mitre and Control. Read only.
# RelatedProduct, Feature, Area, ResourceType, UserImpact, ImplementationCost, Mitre, Control and Step. Read only.
[string] $MaesterConfigPath = "$PSScriptRoot/eidsca-test-metadata.json",

# Authorship seed with the author and contributors of each check (design section 11).
Expand Down Expand Up @@ -573,6 +573,7 @@ function GetMaesterTestAttribute($meta) {
}
if ($meta.Mitre.Count -gt 0) { $lines.Add(" Mitre = $(FormatAttributeList $meta.Mitre)") }
if ($meta.Control.Count -gt 0) { $lines.Add(" Control = $(FormatAttributeList $meta.Control)") }
if ($meta.Step.Count -gt 0) { $lines.Add(" Step = $(FormatAttributeList $meta.Step)") }
$lines.Add(" Service = $(FormatAttributeList $meta.Service)")
if ($meta.License.Count -gt 0) { $lines.Add(" License = $(FormatAttributeList $meta.License)") }
if ($meta.Author.Count -gt 0) { $lines.Add(" Author = $(FormatAttributeList $meta.Author)") }
Expand Down Expand Up @@ -719,6 +720,7 @@ foreach ($control in $aadsc) {
ImplementationCost = if (-not $isInfo) { & $metadataValue 'ImplementationCost' }
Mitre = @(& $metadataValue 'Mitre' | Where-Object { $_ })
Control = @(& $metadataValue 'Control' | Where-Object { $_ })
Step = @(& $metadataValue 'Step' | Where-Object { $_ })
Service = @('Graph')
License = @($skipCheck.License)
Author = $authors
Expand Down
9 changes: 9 additions & 0 deletions build/eidsca/eidsca-test-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"Control": [
"nist-800-53-r5:IA-2(1)",
"nist-800-53-r5:IA-2(2)"
],
"Step": [
"entra.passkeys-enabled"
]
},
{
Expand All @@ -24,6 +27,9 @@
"ImplementationCost": "Low",
"Mitre": [
"T1566.002"
],
"Step": [
"entra.passkeys-enabled"
]
},
{
Expand Down Expand Up @@ -423,6 +429,9 @@
"ImplementationCost": "Low",
"Mitre": [
"None"
],
"Step": [
"entra.temporary-access-pass"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions build/orca/Update-OrcaTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Each upstream check becomes a Maester 3.0 native test (design sections 3 and 14):
tests/orca/Test.ORCA.<n>.ps1 with one [MaesterTest] function, and tests/orca/Test.ORCA.<n>.md.
Maester metadata that ORCA does not carry (severity, author, contributors and the classification
attributes RelatedProduct, Feature, Area, ResourceType, UserImpact, ImplementationCost and Mitre) is
read from build/orca/orca-test-metadata.json. Edit that file, never the generated tests.
attributes RelatedProduct, Feature, Area, ResourceType, UserImpact, ImplementationCost, Mitre, Control
and Step) is read from build/orca/orca-test-metadata.json. Edit that file, never the generated tests.

.PARAMETER Offline
Regenerates only the native tests from the committed check files. Nothing is downloaded.
Expand Down Expand Up @@ -352,6 +352,7 @@ foreach ($check in $checks) {
}
if ($meta.Mitre) { $attribute.Add("Mitre = $(Format-OrcaList @($meta.Mitre))") }
if ($meta.Control) { $attribute.Add("Control = $(Format-OrcaList @($meta.Control))") }
if ($meta.Step) { $attribute.Add("Step = $(Format-OrcaList @($meta.Step))") }
$attribute.Add("Service = $(Format-OrcaList $services)")
# Defender for Office 365 Plan 1 or 2. ORCA detects MDO itself and reports 'not completed' without it.
if ($check.Services -eq 'MDO') { $attribute.Add("License = 'ATP_ENTERPRISE'") }
Expand Down
9 changes: 9 additions & 0 deletions build/orca/orca-test-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@
],
"Control": [
"nist-800-53-r5:SC-8"
],
"Step": [
"defender.dkim"
]
},
"ORCA.108.1": {
Expand All @@ -198,6 +201,9 @@
],
"Control": [
"nist-800-53-r5:SC-8"
],
"Step": [
"defender.dkim"
]
},
"ORCA.109": {
Expand Down Expand Up @@ -1164,6 +1170,9 @@
],
"Control": [
"nist-800-53-r5:SI-8"
],
"Step": [
"defender.spf-hard-fail"
]
},
"ORCA.236": {
Expand Down
Loading
Loading