Skip to content

AI - 61004 - Microsoft Defender for Cloud CSPM plan is enabled on all Azure subscriptions#1239

Draft
praneeth-0000 wants to merge 6 commits into
devfrom
Feature-61004
Draft

AI - 61004 - Microsoft Defender for Cloud CSPM plan is enabled on all Azure subscriptions#1239
praneeth-0000 wants to merge 6 commits into
devfrom
Feature-61004

Conversation

@praneeth-0000
Copy link
Copy Markdown
Collaborator

No description provided.

@praneeth-0000 praneeth-0000 self-assigned this May 26, 2026
@praneeth-0000 praneeth-0000 marked this pull request as draft May 26, 2026 06:08
@praneeth-0000 praneeth-0000 marked this pull request as ready for review May 27, 2026 12:31
@praneeth-0000 praneeth-0000 requested a review from Copilot May 27, 2026 13:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AI pillar assessment (61004) that verifies Microsoft Defender for Cloud's CSPM (CloudPosture) plan is enabled on every enabled Azure subscription, surfacing failing subscriptions in a markdown report.

Changes:

  • New PowerShell test Test-Assessment-61004 that enumerates enabled subscriptions via Azure Resource Graph and checks the Microsoft.Security/pricings/CloudPosture pricing tier per subscription.
  • New markdown description/remediation file for assessment 61004 following the standard <!--- Results ---> / %TestResult% split.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/powershell/tests/Test-Assessment.61004.ps1 Implements the new AI Cloud Posture assessment, including ARG subscription enumeration, per-subscription pricing lookup, and failed-subscription reporting.
src/powershell/tests/Test-Assessment.61004.md Provides user-facing description, rationale, and remediation links for the new assessment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/powershell/tests/Test-Assessment.61004.md Outdated
Comment thread src/powershell/tests/Test-Assessment.61004.ps1
@praneeth-0000 praneeth-0000 added the ready for review PR is ready for review and merging label May 28, 2026
Copy link
Copy Markdown
Collaborator

@alexandair alexandair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@praneeth-0000 Please, address my feedback.

Comment thread src/powershell/tests/Test-Assessment.61004.ps1
Comment thread src/powershell/tests/Test-Assessment.61004.ps1 Outdated
$pricingTier = 'Not Found'

try {
$pricingResponse = Invoke-ZtAzureRequest -Path $pricingPath
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every Q2 query treats an exception as PricingTier = 'Not Found', including 403/Forbidden. The spec says “not authorised” must be surfaced as an assessment-framework permission issue, not a fail. This will produce false failures when the runner can enumerate subscriptions but lacks Security Reader on one subscription.

@praneeth-0000 praneeth-0000 added blocked Cannot proceeed with dev. Waiting on someone. and removed ready for review PR is ready for review and merging labels May 29, 2026
@praneeth-0000 praneeth-0000 marked this pull request as draft May 29, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Cannot proceeed with dev. Waiting on someone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants