feat(m365): add entra_service_prinicipal_privileged_role_no_owners_check#11189
Open
asraym wants to merge 1 commit into
Open
feat(m365): add entra_service_prinicipal_privileged_role_no_owners_check#11189asraym wants to merge 1 commit into
asraym wants to merge 1 commit into
Conversation
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fix #11070
Description
Adds a new M365 check
entra_service_principal_privileged_role_no_ownersthat detects service principals holding privileged Entra directory roles that have at least one owner on either the service principal itself or its parent app registration.An owner can rotate credentials, sign in as the service principal, and inherit its privileges entirely outside PIM approval flows and Conditional Access policies targeting user accounts. Microsoft documents this as a known privilege escalation path.
Check behavior:
Implementation details:
entra_service.pyby addingsp_owner_idsandapp_owner_idsfields to the existingServicePrincipalmodel_get_service_principals()— only fetches owners for Tier 0 SPs to avoid unnecessary API callsTIER_0_ROLE_TEMPLATE_IDSconstantDirectory.Read.Allis already in Prowler's M365 baselineentra_service_principal_no_secrets_for_permanent_tier0_rolesSteps to review
entra_service.py— checksp_owner_ids/app_owner_idsfields added toServicePrincipalmodel and owner-fetching logic added to_get_service_principals()Checklist
Community Checklist
SDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.