Repository navigation
Conversation
… risk detections, one result per detection type A family check with one row per documented workload identity riskEventType (plus any undocumented type with open detections). A row fails when a detection of its type is still atRisk or confirmedCompromised and lists the service principals high risk first, so SecOps can review and dismiss or remediate them. Part of #2730. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M6X8CVGXWW9F5J6Y0CVN94RF
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Up to standards ✅🟢 Issues
|
|
Reviewed this with MT.1273; the full comment is here on #2732, and all of it applies to MT.1274 with the counts changed. The two specific to this file:
The parts worth keeping as they are: the P2 and 403 gates return |
|
Ran this at
|
Important
Opened during the Maester 3.0 code freeze as a draft, for review after the release.
📑 Description
Adds MT.1274, a family check that reports open Entra ID Protection workload identity (service principal) risk detections, with one result per detection type (
MT.1274.<riskEventType>). This is the workload identity half of the design in #2730. Users are in a separate PR (MT.1273, see #2730), and the two PRs are independent.A row fails when at least one detection of its type is still
atRiskorconfirmedCompromised. It lists the service principals, high risk first, and opens with a count by level. Rows for remediated or dismissed detections pass. The recommendation, aimed at the security operations team: review each detection, then dismiss it if benign, or confirm compromised, replace every credential, rotate Key Vault secrets the app can read, and remove anything an attacker added.Part of #2730.
How it works
riskEventTypevalues documented in Securing workload identities, plus a row for any undocumented type that has open detectionsidentityProtection/servicePrincipalRiskDetections(v1.0), two cached reads (atRisk,confirmedCompromised) through the newpowershell/internal/services/entra/Get-MtServicePrincipalRiskDetection.ps1Highfor threat intelligence, admin-confirmed compromise, leaked credentials and malicious application;Mediumfor the restLicense = ('AAD_WRKLDID_P1', 'AAD_WRKLDID_P2'), because the API needs Workload ID Premium. This matches MT.1262 (#2689)IdentityRiskEvent.Read.All, already a default scope; no new consentDuplicate review
MT.1262 and MT.1263 (#2689, #2704) report risky service principals by level from
riskyServicePrincipals. This check reports the detections behind that risk, split by signal, so it's not a shim. The guide links them.Attributes
entra/identity-protection, Areaapplications, ResourceTypeServicePrincipal, SeverityMediumand ImplementationCostMedium(matching MT.1262), UserImpactLow. Mitre T1078.004, T1098.001, T1552. Controlnist-800-53-r5:IR-4,nist-800-53-r5:AC-2(12). LifecyclePreview.✅ Checks
/powershell/tests/pester.ps1locally.ℹ️ Additional Information
Get-MtTest MT.1274is valid. 9 new unit tests inpowershell/tests/functions/Test-MtEntraServicePrincipalRiskDetection.Tests.ps1.🤖 Generated with Claude Code