Skip to content

feat(m365): add exchange_organization_delicensing_resiliency_enabled security check#10608

Merged
danibarranqueroo merged 5 commits into
masterfrom
feat/prowler-871-oauth
Apr 14, 2026
Merged

feat(m365): add exchange_organization_delicensing_resiliency_enabled security check#10608
danibarranqueroo merged 5 commits into
masterfrom
feat/prowler-871-oauth

Conversation

@HugoPBrito
Copy link
Copy Markdown
Member

Context

Without Delicensing Resiliency, removing or reassigning an Exchange Online license causes immediate mailbox inaccessibility, leading to potential data loss and business disruption during routine organizational changes such as role transitions or license optimizations. This misconfiguration is particularly risky during large-scale license migrations where administrators need time to manage transitions without losing access to critical mailbox data.

Description

This check evaluates whether Delayed Delicensing is enabled in the Exchange Online organization configuration. It examines the delayed_delicensing_enabled property on the organization config and reports a PASS when the setting is enabled (providing a grace period for license removals) or a FAIL when disabled (meaning mailboxes immediately lose access upon license removal). Remediation involves running Set-OrganizationConfig -DelayedDelicensingEnabled $true via Exchange Online PowerShell.

Steps to review

  1. Review the check implementation at prowler/providers/m365/services/exchange/exchange_organization_delicensing_resiliency_enabled/
  2. Review the metadata file for correct severity, remediation, and compliance mappings
  3. Review compliance framework mappings in prowler/compliance/m365/ to ensure the check is correctly mapped to relevant requirements
  4. Run the check tests: poetry run pytest tests/providers/m365/services/exchange/exchange_organization_delicensing_resiliency_enabled/ -v
  5. Run the check against a real environment (if possible):
    prowler m365 --check exchange_organization_delicensing_resiliency_enabled

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

SDK/CLI

  • Are there new checks included in this PR? Yes
    • If so, do we need to update permissions for the provider? Please review this carefully.

License

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

@HugoPBrito HugoPBrito force-pushed the feat/prowler-871-oauth branch from 1bc1ad7 to 93bf117 Compare April 8, 2026 10:29
@github-actions github-actions Bot added compliance Issues/PRs related with the Compliance Frameworks provider/m365 Issues/PRs related with the M365 provider metadata-review labels Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

Compliance Mapping Review

This PR adds new checks. Please verify that they have been mapped to the relevant compliance framework requirements.

New checks already mapped in this PR

  • exchange_organization_delicensing_resiliency_enabled (m365): iso27001_2022_m365

Use the no-compliance-check label to skip this check.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 77.38095% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.04%. Comparing base (bc3fd79) to head (00e33ad).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10608      +/-   ##
==========================================
- Coverage   88.07%   88.04%   -0.04%     
==========================================
  Files         125      127       +2     
  Lines        5251     5335      +84     
==========================================
+ Hits         4625     4697      +72     
- Misses        626      638      +12     
Flag Coverage Δ
prowler-py3.10-m365 88.02% <77.38%> (-0.06%) ⬇️
prowler-py3.11-m365 87.91% <77.38%> (-0.17%) ⬇️
prowler-py3.12-m365 88.00% <77.38%> (-0.08%) ⬇️

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

Components Coverage Δ
prowler 88.04% <77.38%> (-0.04%) ⬇️
api ∅ <ø> (∅)
🚀 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

🔒 Container Security Scan

Image: prowler:cd4bd4d
Last scan: 2026-04-14 11:35:36 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 4
Total 4

4 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

…security check

Add new security check exchange_organization_delicensing_resiliency_enabled for m365 provider.
Includes check implementation, fixer, metadata, and unit tests.
The check is license-aware: returns PASS when the feature is enabled or the
tenant has fewer than 5000 total licenses, and MANUAL otherwise.
@HugoPBrito HugoPBrito force-pushed the feat/prowler-871-oauth branch from 93bf117 to fda4818 Compare April 8, 2026 14:39
@HugoPBrito HugoPBrito marked this pull request as ready for review April 8, 2026 14:45
@HugoPBrito HugoPBrito requested a review from a team April 8, 2026 14:45
@HugoPBrito HugoPBrito requested a review from a team as a code owner April 8, 2026 14:45
@danibarranqueroo danibarranqueroo merged commit e24e1ab into master Apr 14, 2026
34 of 36 checks passed
@danibarranqueroo danibarranqueroo deleted the feat/prowler-871-oauth branch April 14, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compliance Issues/PRs related with the Compliance Frameworks metadata-review provider/m365 Issues/PRs related with the M365 provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants