Skip to content

Conversation

@andoniaf
Copy link
Member

@andoniaf andoniaf commented Jan 20, 2026

⚠️ Dependency

This PR should be merged after #9832 or #9833 which include improved error handling for missing Defender ATP cmdlets (logs a WARNING instead of ERROR when the tenant lacks Microsoft Defender for Office 365 licensing).


Context

Adds a new security check defender_atp_safe_attachments_policy_enabled for the m365 provider.

Description

This PR adds a new security check for m365:

  • Check: defender_atp_safe_attachments_policy_enabled
  • Implementation: New check that detects security misconfigurations
  • Tests: Unit tests covering pass, fail, and no-resources scenarios

Steps to review

  1. Review the check implementation at prowler/providers/m365/services/defender/defender_atp_safe_attachments_policy_enabled/
  2. Review the metadata file for correct severity, remediation, and compliance mappings
  3. Run the check tests: poetry run pytest tests/providers/m365/services/defender/defender_atp_safe_attachments_policy_enabled/ -v
  4. Run the check against a real environment (if possible):
    prowler m365 --check defender_atp_safe_attachments_policy_enabled

Checklist

Community Checklist

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.

@andoniaf andoniaf requested review from a team as code owners January 20, 2026 15:25
@github-actions github-actions bot added provider/m365 Issues/PRs related with the M365 provider metadata-review labels Jan 20, 2026
… check

Add new security check defender_atp_safe_attachments_policy_enabled for m365 provider.
Includes check implementation, metadata, and unit tests.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

✅ All necessary CHANGELOG.md files have been updated.

@andoniaf andoniaf force-pushed the feat/prowler-709-defender-atp-safe-attachments-policy-enabled branch from b1d97a1 to 268e813 Compare January 20, 2026 15:25
@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

Conflict Markers Resolved

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

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.83%. Comparing base (31b53f0) to head (ce47418).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9837      +/-   ##
==========================================
+ Coverage   86.60%   88.83%   +2.22%     
==========================================
  Files         222       94     -128     
  Lines        5645     3565    -2080     
==========================================
- Hits         4889     3167    -1722     
+ Misses        756      398     -358     
Flag Coverage Δ
prowler-py3.10-azure ?
prowler-py3.10-m365 88.66% <93.33%> (?)
prowler-py3.11-azure ?
prowler-py3.11-m365 88.66% <93.33%> (?)
prowler-py3.12-azure ?
prowler-py3.12-m365 88.83% <93.33%> (?)
prowler-py3.9-azure ?
prowler-py3.9-m365 88.83% <93.33%> (?)

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

Components Coverage Δ
prowler 88.83% <93.33%> (+2.22%) ⬆️
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
Contributor

github-actions bot commented Jan 20, 2026

🔒 Container Security Scan

Image: prowler:f1da8fb
Last scan: 2026-01-23 13:36:10 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 3
Total 3

3 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:

Move defender_atp_safe_attachments_policy_enabled entry from v5.17.0
(already released) to v5.18.0 unreleased section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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