Information
Enabling blob versioning allows for the automatic retention of previous versions of objects. With blob versioning enabled, earlier versions of a blob are accessible for data recovery in the event of modifications or deletions.
Blob versioning safeguards data integrity and enables recovery by retaining previous versions of stored objects, facilitating quick restoration from accidental deletion, modification, or malicious activity.
NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.
Solution
Remediate from Azure Portal
- Go to Storage accounts
- Click the name of a storage account with blob storage.
- In the Overview page, on the Properties tab, under Blob service click Disabled next to Versioning
- Under Tracking check the box next to Enable versioning for blobs
- Select the radio button next to Keep all versions or Delete versions after (in days)
- If selecting to delete versions, enter a number of in the box after which to delete blob versions.
- Click Save
- Repeat steps 1-7 for each storage account with blob storage.
Remediate from Azure CLI
For each storage account requiring remediation, run the following command to enable blob versioning:
az storage account blob-service-properties update --account-name <storage-account> --enable-versioning true
Remediate from PowerShell
For each storage account requiring remediation, run the following command to enable blob versioning:
Update-AzStorageBlobServiceProperty -ResourceGroupName <resource-group> -StorageAccountName <storage-account> -IsVersioningEnabled $true
Impact:
Enabling blob versioning for a storage account creates a new version with each write operation to a blob, which can increase storage costs. To control these costs, a lifecycle management policy can be applied to automatically delete older versions.