fix(m365): move KNOWN_PLATFORMS to entra_service and normalize case

Move the constant from the check module to the service module so it
can be reused, and switch to a lowercase frozenset for
case-insensitive comparison.
This commit is contained in:
Hugo P.Brito committed 2026-04-08 13:25:17 +01:00
1 parent a491a50afd
commit 85195096be
2 files changed
+4 -2

No files matched your search

@@ -1,12 +1,11 @@
from prowler.lib.check.models import Check, CheckReportM365
from prowler.providers.m365.services.entra.entra_client import entra_client
from prowler.providers.m365.services.entra.entra_service import (
KNOWN_PLATFORMS,
ConditionalAccessGrantControl,
ConditionalAccessPolicyState,
)
KNOWN_PLATFORMS = {"android", "iOS", "windows", "macOS", "linux"}
class entra_conditional_access_policy_unknown_device_blocked(Check):
"""Check if at least one Conditional Access policy blocks unknown device platforms.
@@ -1004,6 +1004,9 @@ class PlatformConditions(BaseModel):
allow_population_by_field_name = True
KNOWN_PLATFORMS = frozenset({"android", "ios", "windows", "macos", "linux"})
class TransferMethod(Enum):
"""Transfer methods for authentication flows in Conditional Access policies."""