Skip to content

Conversation

@HugoPBrito
Copy link
Member

Context

SharePoint external sharing check flagged tenants even when org-level external sharing was disabled.

Fix #9292

Description

  • Updated sharepoint_external_sharing_managed.py to treat sharingCapability == "Disabled" as a PASS before domain restriction evaluation, preventing false positives.
  • Added coverage for the disabled-sharing scenario in sharepoint_external_sharing_managed_test.py.

Steps to review

  1. Read logic change and test addition in the two files above.
  2. Run poetry run pytest tests/providers/m365/services/sharepoint/sharepoint_external_sharing_managed/sharepoint_external_sharing_managed_test.py (or full M365 suite) to verify.
  3. Do a practical test with a real account changing sharepoint settings.

Checklist

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

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

@HugoPBrito HugoPBrito requested review from a team as code owners November 24, 2025 12:44
@github-actions github-actions bot added the provider/m365 Issues/PRs related with the M365 provider label Nov 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

Conflict Markers Resolved

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

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (2608886) to head (6e13420).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9298       +/-   ##
===========================================
+ Coverage   75.39%   88.53%   +13.13%     
===========================================
  Files           1       93       +92     
  Lines         126     3505     +3379     
===========================================
+ Hits           95     3103     +3008     
- Misses         31      402      +371     
Flag Coverage Δ
prowler-py3.10-config ?
prowler-py3.10-m365 88.53% <100.00%> (?)
prowler-py3.11-config ?
prowler-py3.11-m365 88.53% <100.00%> (?)
prowler-py3.12-config ?
prowler-py3.12-m365 88.53% <100.00%> (?)
prowler-py3.9-config ?
prowler-py3.9-m365 88.53% <100.00%> (?)

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

Components Coverage Δ
prowler 88.53% <100.00%> (+13.13%) ⬆️
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 Nov 24, 2025

🔒 Container Security Scan

Image: prowler:cd4d233
Last scan: 2025-11-26 11:21:32 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 2
Total 2

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

…o PROWLER-404-fix-sharepoint-external-sharing-false-positives
@danibarranqueroo danibarranqueroo added the backport-to-v5.14 Backport PR to the v5.14 branch label Nov 26, 2025
@HugoPBrito HugoPBrito merged commit 880345b into master Nov 26, 2025
32 checks passed
@HugoPBrito HugoPBrito deleted the PROWLER-404-fix-sharepoint-external-sharing-false-positives branch November 26, 2025 11:23
@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Nov 26, 2025
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v5.14

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v5.14 Backport PR to the v5.14 branch provider/m365 Issues/PRs related with the M365 provider was-backported The PR was successfully backported to the target branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharepoint External Sharing False Positive

4 participants