You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(compliance): add CCN-STIC-885C Exchange Online requirements to ENS for M365 - #13411
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.
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.
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
uv run pytest tests/lib/check/compliance_ens_m365_catalog_test.py -q
uv run pytest tests/lib/check/compliance_catalog_integrity_test.py -k ens_rd2022_m365 -q
uv run pytest -n auto tests/lib/check/ tests/lib/outputs/compliance/ tests/dashboard -q (5097 passed locally).
uv run python prowler-cli.py m365 --list-compliance-requirements ens_rd2022_m365
Spot-check each new DescripcionControl against sections 3, 4 and 6 of the guide.
Checklist
Community Checklist
This feature/issue is listed in the open issues or roadmap.prowler.com
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.
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.
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: 2 · 2
Failed checks: 2 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
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
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 checks: 2 passed
Check name
Status
Explanation
Title check
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
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
communityOpened by the CommunitycomplianceIssues/PRs related with the Compliance Frameworks
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.<measure>.m365.<service>.<n>, withdefenderfor the mail protections, as in the existing rows.op.acc.1accounts and licences (885A)op.acc.1.m365.entra.1op.acc.2shared mailbox permissions and mailbox typeop.acc.2.m365.exchange.1, manualop.acc.3Exchange roles and role groupsop.acc.3.m365.exchange.1, manualop.acc.4role assignment policiesop.acc.4.m365.exchange.1, manualop.acc.5/op.acc.6apps without modern authentication blockedop.acc.6.m365.exchange.1,exchange_organization_modern_authentication_enabledandentra_legacy_authentication_blockedop.exp.8audit logop.exp.8.m365.purview.1andop.exp.8.m365.exchange.1op.exp.8shared mailbox auditingop.exp.8.m365.exchange.2, manualop.monalertsop.mon.3.m365.defender.1mp.info.2retention labels, sensitivity labelsmp.info.2.m365.purview.1and.3mp.info.6litigation holdmp.info.6.m365.exchange.1, manualmp.info.6Single Item Recoverymp.info.6.m365.exchange.2, manualmp.info.6Exchange archivingmp.info.6.m365.exchange.3, manualmp.infomail flow rulesmp.info.2.m365.exchange.1, manualmp.s.1malware filtersop.exp.6.m365.defender.1mp.s.1connection filters, inbound spam filtersmp.s.1.m365.defender.1mp.s.1outbound spam filtersmp.s.1.m365.defender.4, manualmp.s.1quarantine policiesmp.s.1.m365.defender.5, manualmp.s.1quarantined mail reviewedmp.s.1.m365.defender.6, manualmp.s.1DKIMmp.s.1.m365.defender.2mp.s.1anti-phishing policiesmp.s.1.m365.defender.3mp.s.1Safe Attachmentsmp.s.1.m365.defender.7,defender_safe_attachments_policy_enabledmp.s.1Safe Linksmp.s.1.m365.defender.8,defender_safelinks_policy_enabledmp.s.4denial of servicemp.s.4.m365.platform.1op.exp.2.m365.exchange.2, manualop.exp.2.m365.exchange.3, manualop.exp.2.m365.exchange.4, manualFiling decisions for the reviewer
op.acc.5andop.acc.6together. The setting is tenant-wide, so I filed it once underop.acc.6, where the catalog already keeps authentication.mp.infoin the guide. I filed it undermp.info.2.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_enabledanddefender_safelinks_policy_enabledrequire 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_enabledfor shared mailboxes: its metadata scopes it to user mailboxes, and it is already mapped inop.exp.8.m365.exchange.1.defender_antispam_outbound_policy_configuredanddefender_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
tests/lib/check/compliance_ens_m365_catalog_test.py, the same file as in feat(compliance): add CCN-STIC-885B SharePoint Online requirements to ENS for M365 #13408 and feat(compliance): add CCN-STIC-885D Microsoft Teams requirements to ENS for M365 #13409: ids name the measure they are filed under, the requirements of a measure share its metadata, numbering has no gaps, and the execution mode matches whether the requirement has checks.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
uv run pytest tests/lib/check/compliance_ens_m365_catalog_test.py -quv run pytest tests/lib/check/compliance_catalog_integrity_test.py -k ens_rd2022_m365 -quv run pytest -n auto tests/lib/check/ tests/lib/outputs/compliance/ tests/dashboard -q(5097 passed locally).uv run python prowler-cli.py m365 --list-compliance-requirements ens_rd2022_m365DescripcionControlagainst sections 3, 4 and 6 of the guide.Checklist
Community Checklist
SDK/CLI
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