Skip to content

Defender for Cloud: one result per recommendation #2514

Open

Description

@merill

Summary

Import Microsoft Defender for Cloud recommendations (assessments) for the subscriptions the user can read, one result per recommendation with the affected resources listed.

Opt-in. Like everything under #2510, this does not run by default; users turn it on explicitly, and any extra permission it needs is only requested then.

Source

  • Azure Resource Graph through the existing Invoke-MtAzureResourceGraphRequest:
    securityresources | where type == "microsoft.security/assessments"
    then summarise by properties.displayName / assessment key: status (Healthy, Unhealthy, NotApplicable), severity, properties.risk (risk level when Defender CSPM is on), affected resource count, and properties.links.azurePortal.
  • Permission: Reader or Security Reader on the subscriptions or a management group. Works across subscriptions in one query.
  • Licence: Foundational CSPM (free) gives recommendations and secure score. Defender CSPM adds risk levels and attack paths. Defender plans (Servers, Storage, SQL, Containers…) add workload recommendations.

Behaviour

  • Service = 'Azure'. Runs only when the user opts in and has connected to Azure; otherwise skipped.
  • InstanceSource returns one instance per recommendation (not per resource) so large estates stay readable. The result table lists affected resources (capped, with a link to the full list in the portal).
  • Passed when no resource is Unhealthy; Failed otherwise. NotApplicable on all resources → Skipped.
  • Exemptions (microsoft.security/assessments with status cause Exempt) → Skipped with the exemption reason.
  • Severity from the recommendation; when Defender CSPM gives a risk level, prefer it.
  • Config option to scope to selected subscriptions or a management group, which also helps Run maester on subscription only? #2189 (Azure-only runs).

Notes

Defender for Cloud also covers multicloud (AWS, GCP) and DevOps (GitHub, Azure DevOps) connectors; those recommendations come through the same query and can be included later with a filter.


Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnew testproduct: azure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions