Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jodyford added graph query for G02.08 #881

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions checklists/alz_checklist.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,7 @@
"guid": "cdb3751a-b2ab-413a-ba6e-55d7d8a2adb1",
"id": "G02.07",
"severity": "Medium",
"graph" : "Resources | where type =~ 'microsoft.keyvault/vaults' | extend properties = parse_json(properties) | project id, name, location, firewallEnabled = properties.networkAcls.defaultAction, privateEndpointConnections = properties.privateEndpointConnections | extend compliant = iff(firewallEnabled == 'Deny' or array_length(privateEndpointConnections) > 0, 1, 0) | where compliant == 1 | project id, compliant",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jodyford-msft - So this query is only going to show the ones that are compliant, but not the non-compliant ones, from my understanding. I think we want to take out the "where compliant" to show all.

I was liking the output of:

Resources | where type =~ 'microsoft.keyvault/vaults' | extend properties = parse_json(properties) | project id, name, location, firewallEnabled = properties.networkAcls.defaultAction, privateEndpointConnections = properties.privateEndpointConnections | extend compliant = iff(firewallEnabled == 'Deny' or array_length(privateEndpointConnections) > 0, 1, 0) | project id, compliant, name, location

"link": "https://learn.microsoft.com/azure/key-vault/general/best-practices",
"training": "https://learn.microsoft.com/training/modules/design-implement-private-access-to-azure-services/"
},
Expand Down
Loading