-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
Bypass 'Get-AzSKAzureServicesSecurityStatus' cmdlet's confirmation prompt for attestation
If possible can you guys please add the force/confirm feature to 'Get-AzSKAzureServicesSecurityStatus' cmdlet.
We are trying to automate the resources attestation using a PowerShell runbook, the attestation is successful. But, we don't see any attestations details in the security report. After further investigation, we found that we do not have a force/confirm switch to bypass the below prompt in automation.
Steps to reproduce
# Attestation
foreach ($inputItem in $inputContents) {
$ControlID = $inputItem.ControlID
$ResourceName = $inputItem.ResourceName
$AttestationStatus = $inputItem.AttestationStatus
$JustificationText = $inputItem.JustificationText
try {
Get-AzSKAzureServicesSecurityStatus -SubscriptionId $RunAsConnection.SubscriptionId `
-ResourceNames $ResourceName `
-ControlsToAttest NotAttested `
-ControlId $ControlID `
-AttestationStatus $AttestationStatus `
-JustificationText $JustificationText
Write-Host "INFO: Completed the attestation for $ResourceName"
}
catch {
Write-Host "ERROR: Could not attest the resource $ResourceName due to error $_ "
}
}Metadata
Metadata
Assignees
Labels
No labels
