You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ Connect-ZtAssessment
17
17
Invoke-ZtAssessment
18
18
```
19
19
20
+
## Infrastructure Pillar Scope
21
+
22
+
Infrastructure pillar results are based on Microsoft Defender for Cloud recommendations and only include Azure subscriptions tagged with `ZeroTrustAssessment:Infrastructure`.
23
+
20
24
## Quicklinks
21
25
22
26
*[aka.ms/zerotrust/assessment](https://aka.ms/zerotrust/assessment) → Microsoft Learn docs page for the assessment (includes install guide).
Write-PSFMessage"Infrastructure tag query returned $($taggedSubscriptions.Count) subscriptions"-Tag Test -Level VeryVerbose
133
+
}
134
+
catch {
135
+
Write-PSFMessage"Infrastructure tag ARG query failed: $($_.Exception.Message)"-Tag Test -Level Warning
136
+
$httpStatusCode=$null
137
+
# Invoke-ZtAzureRequestCache throws a string like:
138
+
# "Azure REST request failed with status 403: ..."
139
+
# so there is no .Response property. Parse the message instead.
140
+
if ($_.Exception.Message-match'with status (\d+):') {
141
+
$httpStatusCode= [int]$Matches[1]
142
+
}
143
+
144
+
if ($httpStatusCode-in@(401,403)) {
145
+
Write-PSFMessage"Infrastructure tag ARG query returned (HTTP $httpStatusCode) — insufficient permissions."-Tag Test -Level Warning
146
+
Add-ZtTestResultDetail-SkippedBecause NoAzureAccess -Result 'Unable to query tagged subscriptions for Infrastructure scan due to insufficient Azure permissions. Ensure you have Azure Resource Graph read access and the subscriptions are tagged with ZeroTrustAssessment:Infrastructure.'
147
+
return
148
+
}
149
+
Write-PSFMessage"Infrastructure tag ARG query returned (HTTP $httpStatusCode) — unexpected error."-Tag Test -Level Warning
150
+
Add-ZtTestResultDetail-SkippedBecause NotSupported -Result 'Unable to query tagged subscriptions for Infrastructure scan due to an Azure Resource Graph error. Ensure Azure Resource Graph access is available and subscriptions are tagged with ZeroTrustAssessment:Infrastructure.'
Write-PSFMessage'No subscriptions found with Infrastructure scan tag.'-Tag Test -Level Verbose
163
+
Add-ZtTestResultDetail-SkippedBecause NotApplicable -Result 'No subscriptions are tagged for Infrastructure scan. Apply the tag ZeroTrustAssessment:Infrastructure to each subscription that should be included.'
125
164
return
126
165
}
127
166
@@ -350,7 +389,7 @@ securityresources
350
389
Write-ZtProgress-Activity $activity-Status 'Querying Azure Resource Graph for secure score recommendations'
The results below are based on Microsoft Defender for Cloud recommendations identified in the scanned environment.
17
+
The results below are based on Microsoft Defender for Cloud recommendations identified in the scanned environment. You must apply the following tag to each Azure subscription which you want to be included in the scan: ZeroTrustAssessment:Infrastructure.
0 commit comments