Add MT.1177-MT.1180: LAPS, ASR, App Control, Managed Installer Intune tests#1676
Add MT.1177-MT.1180: LAPS, ASR, App Control, Managed Installer Intune tests#1676OfirGavish wants to merge 22 commits into
Conversation
…d Managed Installer Rules.
…tests - MT.1124: Ensure LAPS policy backs up passwords to Entra ID - MT.1125: Ensure ASR rules configured in Block/Audit mode - MT.1126: Ensure App Control for Business is configured - MT.1127: Ensure Managed Installer enabled in App Control Changes: - Move functions from functions/ to powershell/public/maester/intune/ - Add companion .md remediation files for each test - Add FunctionsToExport entries to Maester.psd1 - Renumber from MT.1200-1203 to MT.1124-1127 - PSScriptAnalyzer clean, pester.ps1 5230/5230 passed
Move MT.1124-1127 It blocks into the shared Describe block in Test-MtIntunePlatform.Tests.ps1, matching the upstream Maester pattern. Remove the 4 separate .Tests.ps1 files.
…r365#1017, MT.1147 by f-bader)
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull request overview
Adds four new Maester Intune Endpoint Security tests (MT.1148–MT.1151) that query deviceManagement/configurationPolicies and validate specific CSP-backed settings for LAPS, ASR Rules, App Control for Business, and Managed Installer, along with remediation docs and module/test wiring.
Changes:
- Added 4 new Intune test functions plus corresponding remediation markdown docs.
- Exported the new functions from the PowerShell module manifest.
- Added 4 new Pester
Itblocks to execute the tests in the Intune platform suite.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Maester/Intune/Test-MtIntunePlatform.Tests.ps1 | Adds MT.1148–MT.1151 Pester entries |
| powershell/public/maester/intune/Test-MtIntuneLAPSConfiguration.ps1 | New test for LAPS Entra ID password backup |
| powershell/public/maester/intune/Test-MtIntuneLAPSConfiguration.md | New remediation guidance for LAPS policy |
| powershell/public/maester/intune/Test-MtIntuneASRRules.ps1 | New test to evaluate ASR rule modes via configurationPolicies settings |
| powershell/public/maester/intune/Test-MtIntuneASRRules.md | New remediation guidance for ASR rules |
| powershell/public/maester/intune/Test-MtIntuneAppControl.ps1 | New test to validate presence/config of App Control for Business policies |
| powershell/public/maester/intune/Test-MtIntuneAppControl.md | New remediation guidance for App Control for Business |
| powershell/public/maester/intune/Test-MtIntuneManagedInstallerRules.ps1 | New test to verify Managed Installer is enabled in App Control policies |
| powershell/public/maester/intune/Test-MtIntuneManagedInstallerRules.md | New remediation guidance for Managed Installer |
| powershell/Maester.psd1 | Exports the 4 new functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- ASR test: align Because text with Block/Audit acceptance criteria - Managed Installer test: clarify Because text to specific MI requirement - ASR.md: document Warn as a fourth supported mode (informational only) - ASR.ps1: do not treat Warn as an active rule for pass criteria - AppControl.md / ManagedInstallerRules.md: fix portal link to Application control blade - maester-config.json: add MT.1148-MT.1151 severity/title entries
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I love the amount of detail in this PR description, @OfirGavish! What did you generate that summary with? Did you use our new agent skill or your own prompt? |
Thank you for this fantastic contribution! 🙌@OfirGavish — this is a really well-executed PR. Adding LAPS, ASR Rules, App Control for Business, and Managed Installer coverage in one shot fills a meaningful gap in Maester's Intune Endpoint Security story. The code quality is high, the companion documentation is thorough, and the remediation guidance is actionable. Great work. I've done a detailed review below. There's one blocker to address before merging, a couple of things worth double-checking, and a few minor suggestions for polish. Full Disclosure: AI helped me write these detailed suggestions based on our custom agent skill for creating and validating Maester tests. 😉 🔴 Blocking — Website documentation pages are missingThe four helper functions reference public docs URLs in their …but the corresponding files (
Example frontmatter for MT.1148: ---
title: MT.1148 - Ensure LAPS Configuration Policy is properly set
description: Checks Intune Endpoint Security Account Protection policies for Windows LAPS profiles that back up local administrator passwords to Microsoft Entra ID.
slug: /tests/MT.1148
sidebar_class_name: hidden
---🟡 Important —
|
|
Thank you Sam, I used my own personal prompt, working with GHCP on VSCode with Opus 4.6 mostly |
- Add website docs pages MT.1148-MT.1151 (blocking item) - Add Test-MtConnection Graph guard to all 4 functions - Fix LAPS AutoAccountMgmt to handle both simpleSettingValue and choiceSettingValue - Add 'See https://maester.dev/docs/tests/MT.XXXX' links to all 4 It block titles - Prefix pass result messages with 'Well done.' per Maester style guide - Add break after BackupDirectory suffix match in LAPS test - Track and display Warn rule count in ASR policy summary
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- LAPS: surface PostAuthDelay in the per-policy results table (was parsed but unused) - ASR: update comment-based help to list all four supported modes (Block/Audit/Warn/Disabled), matching the implementation and the .md doc
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The condition matches policies with no Block rules and >=1 Audit rule (which may also include Warn/Disabled rules), so the wording 'Audit mode only' was misleading. Reworded to accurately describe what the condition checks.
|
Thanks so much for putting this together — these Intune checks fill an important gap, and the PR is already in good shape structurally. I reviewed it with the Maester test checklist and the I do think a few logic issues should be tightened before this is production-ready, mainly to avoid false passes/false failures in tenant assessments:
One more practical blocker: GitHub currently reports the PR as conflicting, so it will also need a rebase or merge update before it can be merged. Again, thank you for the contribution — the scaffolding and documentation are very close. Once the pass criteria match the stated security outcomes and the conflict is resolved, this should be much easier to approve confidently. |
SamErde
left a comment
There was a problem hiding this comment.
See previous comment and suggestions. Thanks again! 🙂
Upstream merill commit 7ebade5 (Added test meta data, May 2 2026) claimed MT.1148-MT.1151 for Microsoft Defender antivirus tests: MT.1148 Archive Scanning should be enabled MT.1149 Behavior Monitoring should be enabled MT.1150 Cloud Protection should be enabled MT.1151 Email Scanning should be enabled Renumber this PR's Intune Endpoint Security tests to the next available contiguous range MT.1177-MT.1180 to resolve the add/add conflicts on website/docs/tests/maester/MT.115X.md and the title collisions in tests/maester-config.json. MT.1148 -> MT.1177 LAPS Configuration Policy MT.1149 -> MT.1178 ASR Rules MT.1150 -> MT.1179 App Control for Business MT.1151 -> MT.1180 Managed Installer
MT.1177 LAPS: pass now requires Entra backup AND complexity >= _4 AND length >= 14 AND a defined post-auth action (per-policy boolean tracking, Compliant column added). MT.1178 ASR: pivot to Microsoft Defender ASR Standard Protection baseline. Pass now requires every baseline rule (Block abuse of exploited vulnerable signed drivers, Block credential stealing from LSASS, Block persistence through WMI event subscription) to be in Block or Audit mode across the union of all policies. Additional rules still listed for visibility. MT.1179 App Control: detect uploaded XML payload (simpleSettingValue under upload_policy_selected). Pass now requires at least one policy to be enforcing (audit mode disabled) AND have either built-in controls or a non-empty XML upload. Audit-only policies and empty XML uploads are reported but no longer pass. MT.1180 Managed Installer: pass now requires at least one App Control policy to be in Enforce mode AND have Managed Installer enabled. Managed Installer on an audit-only policy is reported but no longer passes, since the underlying App Control is not blocking. Website docs (MT.1177-1180.md) updated to document the new pass criteria.
|
Hi @SamErde - thanks again for the detailed review. Pushing the following in Renumber: MT.1148-MT.1151 -> MT.1177-MT.1180 Upstream Logic gaps from your second-round review
Validation
Note on remaining mergeable=CONFLICTING The renumbering cleared the file-rename collision on the website docs. The remaining conflict is positional in |
|
@copilot resolve the merge conflicts in this pull request |
Resolves conflicts in powershell/Maester.psd1 and tests/maester-config.json by taking upstream's version and re-inserting the four MT.1177-MT.1180 entries (LAPS, ASR, App Control, Managed Installer). Validation: - PowerShell parser: clean on all 4 test files - PSScriptAnalyzer (Warning + Error): 0 issues - Test-ModuleManifest: passes (now reports v2.0.0 from upstream) - maester-config.json: parses
|
Follow-up: I went ahead and rebased / merged GitHub now reports the PR as
Ready for another look whenever you have time. |
Code fixes: - Test-MtIntuneASRRules.ps1: remove duplicate .EXAMPLE block. - Test-MtIntuneManagedInstallerRules.ps1: gate pass on active App Control (built-in controls OR non-empty uploaded XML). An enforce-mode upload policy with empty XML + MI enabled no longer falsely passes. Mirrors the active-control gate used by MT.1179. Report empty-XML MI policies alongside audit-mode MI policies in failure output. Expand result table with Build Options + Policy XML columns. Update .DESCRIPTION and .EXAMPLE accordingly. Companion docs (powershell/public/maester/intune/*.md): - LAPS: pass now requires Entra backup AND complexity >= _4 AND length >= 14 AND a defined post-auth action. - ASRRules: pass now requires every Standard Protection baseline rule (drivers, LSASS, WMI persistence) in Block or Audit across the union of all ASR policies. Links to MS Defender baseline. - AppControl: pass now requires Enforce mode AND active control (built-in or non-empty uploaded XML). - ManagedInstallerRules: pass now requires Enforce mode AND MI enabled AND active control. Website docs: - Regenerated MT.1177.md, MT.1178.md, MT.1179.md, MT.1180.md via website/scripts/generate-test-docs.mjs so they reflect the authoritative companion .md content (no longer hand-authored).
|
Thanks for the thorough review! I've pushed Code (2)
Companion
Website docs (4) — Validation: parser clean, PSScriptAnalyzer clean for all four |
Issue 1 — Duplicated remediation/related-links sections in MT.1177-1180 - Root cause: the website doc generator's dedup check (renderTestPage in website/scripts/generate-test-docs.mjs) compares the raw companion .md (CRLF on Windows) against the extracted Remediation/Related Links sections (which extract() normalizes to LF by splitting on /\r?\n/ and joining with \n). Whenever the companion .md is checked out with CRLF endings, String.prototype.includes returns false and the generator emits both copies (inside Overview AND as separate ## sections). - Fix: normalize line endings of the four Intune companion .md files to LF on disk so the dedup check succeeds regardless of platform. Regenerated MT.1177-1180.md no longer have duplicated ## Remediation / ## Related Links blocks. Issue 2 — LAPS `_11` label inconsistency - Companion .md previously labelled `_11` as "disabled-with-rotation" while Test-MtIntuneLAPSConfiguration.ps1:156 reports it as "Reset password + logoff + terminate processes". Aligned the .md wording (and the other suffix labels) to the function's output. Also: merge upstream/main to clear the BEHIND status.
|
Thanks for the second pass! Pushed 1. Duplicated Remediation / Related Links in MT.1177–1180 You were right that the generated pages had both Root cause is in the dedup logic in if (test.remediation && !test.markdown.includes(test.remediation)) { ... }
if (test.relatedLinks && !test.markdown.includes(test.relatedLinks)) { ... }
Fix in this PR: normalize the four Intune companion A proper fix to the generator itself (e.g. normalizing line endings before the 2. LAPS You're right — the docs said "disabled-with-rotation" while Validation: parser clean, PSSA clean, |
Up to standards ✅🟢 Issues
|
Three remaining items from the Copilot review:
1. **LAPS PasswordComplexity wording** (Test-MtIntuneLAPSConfiguration.md / MT.1177):
The pass-criteria paragraph said "complexity >= `_4`" which is technically
ambiguous because the Intune Settings Catalog only exposes `_1`..`_4` plus
the newer `_8` ("improved 4-class") choice — there is no `_5`..`_7`. The
implementation already accepts exactly `_4` or `_8` (which together cover
every value that satisfies the 4-character-class requirement). Tightened
the docs wording to "complexity is `_4` or `_8`" and added a one-line
note explaining why those are the only two valid choices, so the docs
match the code exactly.
2. **Managed Installer remediation steps** (Test-MtIntuneManagedInstallerRules.md / MT.1180):
The remediation list only said "enable Trust apps from managed installer".
The test (after the previous tightening) also requires the policy to be in
Enforce mode (Audit only = Disabled) AND to have an active control
(Built-in controls selected OR a non-empty uploaded XML payload). Updated
the remediation steps to call out both requirements explicitly so users
following the steps actually end up with a passing configuration.
3. **Stale test indexes** (`website/docs/tests/readme.md`,
`website/docs/tests/maester/readme.md`, `website/docs/tests/tags/readme.md`):
The generated indexes did not include MT.1177-1180. Regenerated via
`npm --prefix website run generate-test-docs`. The three index pages now
list the four new tests and the Maester count is bumped from 144 to 148.
Notes:
- Only files actually relevant to this PR are included. Other generated
pages in `website/docs/tests/` show up as "stale" on Windows due to the
pre-existing CRLF/LF dedup bug in `generate-test-docs.mjs` that I called
out in the previous reply; those are intentionally left alone and a
separate upstream fix to the generator would clear them globally.
Validation:
- PSSA Warning,Error: clean on all four Intune test scripts.
- PowerShell parser: clean.
- Test-ModuleManifest: OK (v2.0.0, 396 exported functions).
- `tests/maester-config.json`: parses OK.
- `generate-test-docs.mjs --check`: no drift reported for MT.1177-1180 or
the three regenerated index pages.
This PR adds four Intune Endpoint Security tests for Microsoft Defender controls. Tests have been renumbered to MT.1177-MT.1180 to avoid collision with upstream MT.1148-MT.1151 (Defender antivirus batch).
Tests
Pass criteria (per @SamErde review)
_4AND Password Length >= 14 AND a defined Post-Authentication Action (_1/_3/_5/_11).Files
powershell/public/maester/intune/Test-MtIntuneLAPSConfiguration.ps1powershell/public/maester/intune/Test-MtIntuneASRRules.ps1powershell/public/maester/intune/Test-MtIntuneAppControl.ps1powershell/public/maester/intune/Test-MtIntuneManagedInstallerRules.ps1tests/Maester/Intune/Test-MtIntunePlatform.Tests.ps1(4Itblocks)tests/maester-config.json(4 entries)website/docs/tests/maester/MT.1177.md...MT.1180.mdpowershell/Maester.psd1(4 function exports)Validation
Test-ModuleManifestonMaester.psd1: passesmaester-config.json: parsesRequired Graph permissions
DeviceManagementConfiguration.Read.AllNotes
The remaining
Maester.psd1andtests/maester-config.jsonmergeable=CONFLICTING is positional only (function export ordering / config insert position) caused by upstream churn since the fork branched. Happy to rebase or take a maintainer suggestion on resolution strategy.