Skip to content

Fix CISA.MS.AAD.1.1 to require legacy auth blocking policy scoped to all cloud apps#1651

Merged
merill merged 2 commits into
mainfrom
copilot/fix-legacy-protocols-ca-policy
Apr 15, 2026
Merged

Fix CISA.MS.AAD.1.1 to require legacy auth blocking policy scoped to all cloud apps#1651
merill merged 2 commits into
mainfrom
copilot/fix-legacy-protocols-ca-policy

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Description

Test-MtCisaBlockLegacyAuth was not checking that the CA policy's resource scope includes "All" cloud apps. A policy blocking legacy auth for only specific apps (e.g., Exchange Online only) would pass the test, leaving legacy auth open on other cloud apps.

Added conditions.applications.includeApplications -contains "All" to both the $blockOther and $blockExchangeActiveSync filters — consistent with how the sibling Maester tests (Test-MtCaBlockLegacyOtherAuthentication, Test-MtCaBlockLegacyExchangeActiveSyncAuthentication) already check this.

$blockOther = $result | Where-Object {
    $_.grantControls.builtInControls -contains "block" -and
    $_.conditions.clientAppTypes -contains "other" -and
    $_.conditions.users.includeUsers -contains "All" -and
    $_.conditions.applications.includeApplications -contains "All"  # added
}

Contribution Checklist

Before submitting this PR, please confirm you have completed the following:

  • 📖 Read the guidelines for contributing to this repository.
  • 🧪 Ensure the build and unit tests pass by running /powershell/tests/pester.ps1 on your local system.

 

Join us at the Maester repository discussions 💬 or Entra Discord 🧑‍💻 for more help and conversations!

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 14, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Add check for conditions.applications.includeApplications containing
"All" to both the $blockOther and $blockExchangeActiveSync filters in
Test-MtCisaBlockLegacyAuth. Without this check, a CA policy blocking
legacy auth for only specific apps (not all cloud apps) would
incorrectly pass the test.

Fixes #864

Agent-Logs-Url: https://github.com/maester365/maester/sessions/98fa17c8-0648-471d-8fee-2bfa6b730cc8

Co-authored-by: SamErde <20478745+SamErde@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 14, 2026

Deploying maester with  Cloudflare Pages  Cloudflare Pages

Latest commit: b177edb
Status: ✅  Deploy successful!
Preview URL: https://61a73dbf.maester.pages.dev
Branch Preview URL: https://copilot-fix-legacy-protocols.maester.pages.dev

View logs

Copilot AI changed the title [WIP] Fix legacy protocols CA policy to check for 'all cloud apps' Fix CISA.MS.AAD.1.1 to require legacy auth blocking policy scoped to all cloud apps Apr 14, 2026
Copilot AI requested a review from SamErde April 14, 2026 09:48
@SamErde SamErde marked this pull request as ready for review April 14, 2026 09:53
@SamErde SamErde requested a review from a team as a code owner April 14, 2026 09:53
Copilot AI review requested due to automatic review settings April 14, 2026 09:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the CISA Entra control check for MS.AAD.1.1 by ensuring Conditional Access policies that block legacy authentication are scoped to All cloud apps, preventing “partial-scope” policies (e.g., Exchange Online only) from passing while leaving other apps exposed.

Changes:

  • Add conditions.applications.includeApplications = All requirement to the legacy-auth blocking policy filters.
  • Refine the failing result message to explicitly call out “for all cloud apps”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread powershell/public/cisa/entra/Test-MtCisaBlockLegacyAuth.ps1
Comment thread powershell/public/cisa/entra/Test-MtCisaBlockLegacyAuth.ps1
@SamErde SamErde added the help wanted Extra attention is needed label Apr 15, 2026
@SamErde SamErde removed their assignment Apr 15, 2026
Copy link
Copy Markdown
Contributor

@merill merill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@merill merill merged commit fe8c2ce into main Apr 15, 2026
12 checks passed
@SamErde SamErde deleted the copilot/fix-legacy-protocols-ca-policy branch April 16, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🪲 Legacy protocols CA policy lacks looking for 'all cloud apps;

4 participants