Skip to content

feat(compliance): add CCN-STIC-885C Exchange Online requirements to ENS for M365 - #13411

Merged
pedrooot merged 3 commits into
prowler-cloud:masterfrom
Davmunrey:feat/ens-m365-885c-exchange
Nov 19, 2026
Merged

pedrooot merged 3 commits into
prowler-cloud:masterfrom
Davmunrey:feat/ens-m365-885c-exchange

Conversation

@Davmunrey

@Davmunrey Davmunrey commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Context

ENS RD 311/2022 for Microsoft 365 covers CCN-STIC-885A, the baseline for the shared services. This PR adds the requirements of CCN-STIC-885C, the Exchange Online guide (May 2024 edition), to the same catalog, as agreed in #13387.

Fix #13404

Description

Only prowler/compliance/m365/ens_rd2022_m365.json, its tests and a changelog fragment change. This PR adds 17 requirements: 3 automated and 14 manual.

  • A check is mapped only when it verifies the requirement as the guide states it. Otherwise the requirement is manual.
  • Requirements that 885C delegates to 885A, and the mail protections the catalog already holds, are not repeated.
  • Ids follow <measure>.m365.<service>.<n>, with defender for the mail protections, as in the existing rows.
885C summary row Requirement
op.acc.1 accounts and licences (885A) existing op.acc.1.m365.entra.1
op.acc.2 shared mailbox permissions and mailbox type new op.acc.2.m365.exchange.1, manual
op.acc.3 Exchange roles and role groups new op.acc.3.m365.exchange.1, manual
op.acc.4 role assignment policies new op.acc.4.m365.exchange.1, manual
op.acc.5/op.acc.6 apps without modern authentication blocked new op.acc.6.m365.exchange.1, exchange_organization_modern_authentication_enabled and entra_legacy_authentication_blocked
op.exp.8 audit log existing op.exp.8.m365.purview.1 and op.exp.8.m365.exchange.1
op.exp.8 shared mailbox auditing new op.exp.8.m365.exchange.2, manual
op.mon alerts existing op.mon.3.m365.defender.1
mp.info.2 retention labels, sensitivity labels existing mp.info.2.m365.purview.1 and .3
mp.info.6 litigation hold new mp.info.6.m365.exchange.1, manual
mp.info.6 Single Item Recovery new mp.info.6.m365.exchange.2, manual
mp.info.6 Exchange archiving new mp.info.6.m365.exchange.3, manual
mp.info mail flow rules new mp.info.2.m365.exchange.1, manual
mp.s.1 malware filters existing op.exp.6.m365.defender.1
mp.s.1 connection filters, inbound spam filters existing mp.s.1.m365.defender.1
mp.s.1 outbound spam filters new mp.s.1.m365.defender.4, manual
mp.s.1 quarantine policies new mp.s.1.m365.defender.5, manual
mp.s.1 quarantined mail reviewed new mp.s.1.m365.defender.6, manual
mp.s.1 DKIM existing mp.s.1.m365.defender.2
mp.s.1 anti-phishing policies existing mp.s.1.m365.defender.3
mp.s.1 Safe Attachments new mp.s.1.m365.defender.7, defender_safe_attachments_policy_enabled
mp.s.1 Safe Links new mp.s.1.m365.defender.8, defender_safelinks_policy_enabled
mp.s.4 denial of service existing mp.s.4.m365.platform.1
Other considerations: ActiveSync device access new op.exp.2.m365.exchange.2, manual
Other considerations: mobile device mailbox policies new op.exp.2.m365.exchange.3, manual
Other considerations: sharing policies new op.exp.2.m365.exchange.4, manual

Filing decisions for the reviewer

  • The guide lists authentication under op.acc.5 and op.acc.6 together. The setting is tenant-wide, so I filed it once under op.acc.6, where the catalog already keeps authentication.
  • The mail flow rules row carries only mp.info in the guide. I filed it under mp.info.2.
  • "Other considerations" carry no ENS control in the guide. I filed them under op.exp.2, as the catalog already does with 885A's "Servicios y complementos".

Mapped checks that are stricter than the guide

  • defender_safe_attachments_policy_enabled and defender_safelinks_policy_enabled require a specific secure configuration. The guide only asks for the policies to be configured. Tell me if you prefer these two as manual.

Checks I considered and left out

  • exchange_user_mailbox_auditing_enabled for shared mailboxes: its metadata scopes it to user mailboxes, and it is already mapped in op.exp.8.m365.exchange.1.
  • defender_antispam_outbound_policy_configured and defender_antispam_outbound_policy_forwarding_disabled: the guide describes the outbound policy without setting values for it.
  • admincenter_external_calendar_sharing_disabled: the guide asks for sharing policies, not for external sharing to be off.

Tests

Merge order
This PR, #13408 and #13409 edit the same regions of the JSON. After each one lands I'll merge master into the others. I also checked the three sets together: 77 requirements, and the catalog tests pass.

Steps to review

  1. uv run pytest tests/lib/check/compliance_ens_m365_catalog_test.py -q
  2. uv run pytest tests/lib/check/compliance_catalog_integrity_test.py -k ens_rd2022_m365 -q
  3. uv run pytest -n auto tests/lib/check/ tests/lib/outputs/compliance/ tests/dashboard -q (5097 passed locally).
  4. uv run python prowler-cli.py m365 --list-compliance-requirements ens_rd2022_m365
  5. Spot-check each new DescripcionControl against sections 3, 4 and 6 of the guide.

Checklist

Community Checklist

SDK/CLI

  • Are there new checks included in this PR? No

UI

Not applicable: this PR does not change the UI.

API

Not applicable: this PR does not change API code.

MCP Server

Not applicable: this PR does not change the MCP server.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Summary by CodeRabbit

  • New Features
    • Added Microsoft 365 Exchange Online requirements aligned with the CCN-STIC-885C guide within the ENS RD 311/2022 compliance framework. This adds Exchange Online coverage to the compliance catalog.

The catalog collects the requirements of several CCN-STIC guides in one
file. Check that every requirement id names the RD measure it is filed
under, that the requirements of a measure share its metadata, that the
numbering per measure and service has no gaps, and that the execution
mode matches whether the requirement has checks.
…NS for M365

Add the 17 requirements the Exchange Online guide (May 2024 edition)
sets on top of CCN-STIC-885A, in the existing ENS RD 311/2022 catalog
for Microsoft 365. Three are automated: modern authentication with
legacy authentication blocked, Safe Attachments and Safe Links. The
other 14 are manual: no check verifies them as the guide states them.

Requirements the guide delegates to CCN-STIC-885A, and the mail
protections the catalog already holds, are not repeated.
@Davmunrey
Davmunrey requested a review from a team as a code owner November 17, 2026 15:17
@github-actions github-actions Bot added compliance Issues/PRs related with the Compliance Frameworks community Opened by the Community labels Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files ignored due to path filters: 1

  • prowler/compliance/m365/ens_rd2022_m365.json is excluded by !prowler/compliance/**/*.json
Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b5668918-4e3c-48eb-a8f9-28c1647cd6fd
Commits

Reviewing files that changed from the base of the PR and between 385814b and 62c5dc6.

Files ignored due to path filters: 1

  • prowler/compliance/m365/ens_rd2022_m365.json is excluded by !prowler/compliance/**/*.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds tests that validate the structure and consistency of the ENS M365 catalog. It also adds a changelog entry describing Exchange Online requirements for the framework.

Changes: ENS M365 catalog

Layer / File(s) Summary
Catalog validation and changelog
tests/lib/check/compliance_ens_m365_catalog_test.py, prowler/changelog.d/ens-rd2022-m365-885c-exchange.added.md
The tests check requirement IDs, measure associations, execution modes, shared measure metadata, and consecutive numbering. The changelog describes Exchange Online requirements for the ENS RD 311/2022 framework.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pedrooot

Merge Risk: Minimal · previous review 38581

This change adds tests that check the structure of the Microsoft 365 ENS catalog, plus a changelog note. It does not change runtime behavior, and no merge-blocking risk was found.

Pre-merge checks: Passed 2 · Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #13404 requires 885C Exchange Online requirements in prowler/compliance/m365/ens_rd2022_m365.json, with checks mapped only where they verify the requirement. That file is listed in ignored_files… Provide independent reviewable evidence of the JSON content for the 17 new requirements. This can be an export or excerpt of the new ens_rd2022_m365.json entries, or a review outside the excluded scope. Confirm that each Checks entry names …
Out of Scope Changes check Inconclusive The reviewable changes are the changelog fragment and the catalog test file. Both relate to the ENS M365 catalog change requested by #13404, so they are not out of scope. The main change, the JSON cat… Provide independent reviewable evidence of the complete JSON diff, or an excerpt that shows the changed or added entries in prowler/compliance/m365/ens_rd2022_m365.json. Confirm that every changed entry maps to a 885C Exchange Online requir…
Passed Passed checks: 2 passed

Check name Status Explanation
Title check Passed The title names the main change: adding CCN-STIC-885C Exchange Online requirements to the ENS RD 2022 M365 compliance framework. It matches the changelog fragment, the catalog tests, and the linked is…
Description check Passed The description follows the template. It has Context, Description, Steps to review, and the Community Checklist. It explains the purpose, the linked issue (Fix #13404), the mapping rules, the 17 added…
Full details: Title check

Explanation

The title names the main change: adding CCN-STIC-885C Exchange Online requirements to the ENS RD 2022 M365 compliance framework. It matches the changelog fragment, the catalog tests, and the linked issue #13404. It is specific and follows the conventional-commit style. The term 'feat(compliance)' is a prefix and does not hide the change.

Full details: Description check

Explanation

The description follows the template. It has Context, Description, Steps to review, and the Community Checklist. It explains the purpose, the linked issue (Fix #13404), the mapping rules, the 17 added requirements (3 automated, 14 manual), filing decisions, excluded checks, and the test commands. The UI and API sections are marked not applicable. The author did not tick the backport item, and that item is still open. The author also left the SDK/CLI question answered as 'No'. These gaps are minor, so the description is mostly complete.

Full details: Linked Issues check

Explanation

Issue #13404 requires 885C Exchange Online requirements in prowler/compliance/m365/ens_rd2022_m365.json, with checks mapped only where they verify the requirement. That file is listed in ignored_files, excluded by the rule !prowler/compliance/**/*.json. Its content is not in the review scope, so the new requirement IDs, descriptions, ModoEjecucion values, and Checks mappings cannot be verified. The reviewable evidence does not establish these: the changelog fragment (prowler/changelog.d/ens-rd2022-m365-885c-exchange.added.md) and the catalog test (tests/lib/check/compliance_ens_m365_catalog_test.py) describe the rules the JSON should follow, but they do not show the JSON content. The test checks structure and metadata consistency only, and its pass result is reported by the author, not observed. The PR description mapping table is an author claim, not evidence of the file. Also unverified: that the two stricter automated checks, defender_safe_attachments_policy_enabled and defender_safelinks_policy_enabled, match the guide, and that the mapped check names exist in the repository.

Resolution

Provide independent reviewable evidence of the JSON content for the 17 new requirements. This can be an export or excerpt of the new ens_rd2022_m365.json entries, or a review outside the excluded scope. Confirm that each Checks entry names an existing check and that each automated requirement is backed by a check that verifies the guide text. Then reassess the linked issue requirements.

Full details: Out of Scope Changes check

Explanation

The reviewable changes are the changelog fragment and the catalog test file. Both relate to the ENS M365 catalog change requested by #13404, so they are not out of scope. The main change, the JSON catalog file, is excluded by the rule !prowler/compliance/**/*.json and listed in ignored_files. Its content cannot be inspected. Therefore it is not known whether the JSON contains entries beyond the 17 requirements described for #13404, or changes to existing requirements. The author's list of changed files is not independent evidence of the JSON content.

Resolution

Provide independent reviewable evidence of the complete JSON diff, or an excerpt that shows the changed or added entries in prowler/compliance/m365/ens_rd2022_m365.json. Confirm that every changed entry maps to a 885C Exchange Online requirement from #13404. Then reassess scope.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: de30b1d1-7fc1-4002-a723-1c010ce09701
Commits

Reviewing files that changed from the base of the PR and between 131b68d and 385814b.

Files ignored due to path filters: 1

  • prowler/compliance/m365/ens_rd2022_m365.json is excluded by !prowler/compliance/**/*.json
Files selected for processing: 2

  • prowler/changelog.d/ens-rd2022-m365-885c-exchange.added.md
  • tests/lib/check/compliance_ens_m365_catalog_test.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No Conflicts

No conflict markers, and the branch merges cleanly into its base.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (fd742b5) to head (62c5dc6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13411      +/-   ##
==========================================
- Coverage   93.63%   93.19%   -0.45%     
==========================================
  Files         321      500     +179     
  Lines       47464    55106    +7642     
==========================================
+ Hits        44444    51356    +6912     
- Misses       3020     3750     +730     
Flag Coverage Δ
prowler-py3.10-m365 90.53% <ø> (?)
prowler-py3.11-m365 89.93% <ø> (?)
prowler-py3.12-m365 90.53% <ø> (?)
prowler-py3.13-m365 90.45% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 90.53% <ø> (∅)
api 95.14% <ø> (+<0.01%) ⬆️
mcp_server 69.29% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 17, 2026
pedrooot
pedrooot previously approved these changes Nov 19, 2026

@pedrooot pedrooot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Davmunrey, the mapping is conservative in the right way and the "considered and left out" notes saved me a lot of digging. I'm fine keeping the Safe Attachments and Safe Links checks as automated. Since the four M365 PRs touch the same part of the JSON, this one will need master merged in after whichever lands first. Looks good to me.

@pedrooot
pedrooot dismissed stale reviews from coderabbitai[bot] and themself via 62c5dc6 November 19, 2026 08:54
@pedrooot
pedrooot merged commit 724d353 into prowler-cloud:master Nov 19, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Opened by the Community compliance Issues/PRs related with the Compliance Frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(compliance): ENS RD 311/2022 for Microsoft 365, CCN-STIC-885C (Exchange Online)

2 participants