This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sesivan_databricks
- Loading branch information
Showing
6 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 31 additions & 1 deletion
32
docs/content/services/security/key-vault/code/kv-5/kv-5.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
// under-development | ||
// Azure Resource Graph Query | ||
// This resource graph query will return all Key Vaults that does not have Diagnostic logs enabled | ||
|
||
policyresources | ||
| where type == 'microsoft.policyinsights/policystates' | ||
| where properties.complianceState == 'NonCompliant' | ||
| extend policyDefinitionId = tostring(tolower(properties.policyDefinitionId)),resourceId = tostring(tolower(properties.resourceId)), PolicyAssignmentName = properties.policyAssignmentName, policySetDefinitionId = tostring(tolower(properties.policySetDefinitionId)) | ||
| project resourceId,policySetDefinitionId,policyDefinitionId | ||
| join kind=inner( | ||
policyresources | ||
| where type == 'microsoft.authorization/policydefinitions' | ||
| extend displayName = tostring(properties.displayName) | ||
| where displayName contains "Resource logs in Key Vault should be enabled" | ||
| project policyDefinitionId=tostring(tolower(id)),displayName | ||
) on policyDefinitionId | ||
| project resourceId,policySetDefinitionId,policyDefinitionId | ||
| join kind=inner( | ||
policyresources | ||
| where type == 'microsoft.authorization/policysetdefinitions' | ||
| extend displayName = tostring(properties.displayName) | ||
| where displayName contains "Microsoft cloud security benchmark" | ||
| project policySetDefinitionId=tostring(tolower(id)),displayName | ||
) on policySetDefinitionId | ||
| join kind=inner( | ||
resources | ||
| where type == 'microsoft.keyvault/vaults' | ||
| project resourceId = tostring(tolower(id)),name,tags | ||
)on resourceId | ||
| project-away resourceId1,policySetDefinitionId1,policySetDefinitionId,policyDefinitionId,displayName | ||
| project recommendationID = "kv-5",id=resourceId,name,tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
docs/content/services/storage/azure-netapp-files/code/anf-3/anf-3.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Azure Resource Graph Query | ||
// This Resource Graph query will return all Azure NetApp Files volumes without an availability zone defined. | ||
resources | ||
| where type =~ "microsoft.netapp/netappaccounts/capacitypools/volumes" | ||
| where zones == "[]" | ||
| project recommendationId = "ANF-3", name, id, tags | ||
Resources | ||
| where type =~ "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" | ||
| where array_length(zones) == 0 or isnull(zones) | ||
| project recommendationId = "anf-3", name, id, tags |
6 changes: 3 additions & 3 deletions
6
docs/content/services/storage/storage-Account/code/st-1/st-1.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Azure Resource Graph Query | ||
// This query will return all storage accounts that are not using Zone or Region replication | ||
Resources | ||
| where type =~'microsoft.storage/storageaccounts' | ||
| where sku.name =~'Standard_LRS' | ||
| project recommendationId = 'st-1', name, id, tags, param1=sku.name | ||
| where type =~ "Microsoft.Storage/storageAccounts" | ||
| where sku.name in~ ("Standard_LRS", "Premium_LRS") | ||
| project recommendationId = "st-1", name, id, tags, param1 = strcat("sku: ", sku.name) |