Azure / Azure/Microsoft-Defender-for-Cloud

In accurate results on Defender CSPM workbook

Open
#953 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.9k
Forks
871
Avg merge
3d 10h
Merged PRs (30d)
1

Description

Hello team ,

I am reaching out to you regarding the following item.
https://github.com/Azure/Microsoft-Defender-for-Cloud/tree/main/Workbooks/Defender%20CSPM%20Dashboard

Now when we see this Workbook on Azure Portal , when we check for Agentless scanning for machine part we see 2 results , I wanted to understand why it shows 2 results as both the subscriptions are same .

Secondly the query use in this workbook seems to be buggy , specially the line number 7 , please help us correcting the logic , [

](url)

securityresources
| where type == "microsoft.security/pricings"
| where name in~("CloudPosture", "VirtualMachines", "Containers", "StorageAccounts")
| mv-expand extensions = properties.extensions
| extend extensionName = tostring(extensions.name)
| where extensionName in~("AgentlessVmScanning")
**| extend agentLessVMScan = iff(name in~ ("CloudPosture", "VirtualMachines") and extensionName == "AgentlessVmScanning" and tostring(extensions.isEnabled) == "True", "Good", "Should Enable")**
| distinct subscriptionId, agentLessVMScan

Contributor guide

Open the contributing guide

Research direction

Start in Workbooks/Defender CSPM Dashboard and reproduce the Agentless scanning results in the Azure portal. Read the displayed query, especially the highlighted line and its distinct subscription output, then compare the two subscriptions and determine the expected single-result behavior. Done means the duplicate result is explained and the workbook query logic is corrected and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.