Azure Blob Storage
storage.azure_blob
Protects against destructive Azure Blob Storage operations like container deletion, blob deletion, and azcopy remove.
- 6blocking rules
- 19safe patterns
- 2Critical
- 3High
- 1Medium
[packs]
enabled = ["storage.azure_blob"]Evaluated when a command contains azcopy.
Blocking rules
Each rule ID is storage.azure_blob:<name>. Use it in allowlists and [policy.rules].
Criticalaz-storage-account-deleteaz storage account delete removes an entire Azure storage account.
Explanation
Deleting a storage account removes all containers, blobs, tables, queues, and file shares within it. The account name may not be immediately reclaimable. All dependent applications will fail completely. Safer alternatives: - az storage account show: Review account configuration - azcopy copy: Backup all data before deletion - Verify no active resources depend on this account
Criticalaz-storage-container-deleteaz storage container delete removes an Azure storage container.
Explanation
Deleting an Azure storage container removes all blobs within it permanently. Unless soft delete is enabled, data cannot be recovered. Applications and services referencing this container will fail. Safer alternatives: - az storage container list: Review containers first - az storage blob list -c X: Inventory contents - Enable soft delete before testing deletions
Highaz-storage-blob-delete-batchaz storage blob delete-batch removes multiple blobs from Azure storage.
Explanation
Batch deletion removes many blobs at once based on patterns. Without soft delete enabled, removed blobs cannot be recovered. Patterns may match more files than expected. Safer alternatives: - az storage blob list --pattern: Preview matching blobs - Enable soft delete for recovery window - azcopy copy to backup before deletion
Highazcopy-removeazcopy remove deletes files from Azure storage.
Explanation
The azcopy remove command deletes blobs from Azure storage. With --recursive, entire directory trees are removed. Without soft delete, data is permanently lost and cannot be recovered. Safer alternatives: - azcopy list: Preview files to be deleted - Enable soft delete before removing - azcopy copy to backup location first
Highazcopy-sync-deleteazcopy sync --delete-destination removes destination files not in source.
Explanation
The --delete-destination flag removes files from the destination that don't exist in the source. If source and destination are swapped, or if source is unexpectedly empty, this can cause complete data loss. Safer alternatives: - azcopy sync --dry-run: Preview changes first - azcopy sync without --delete-destination: Only adds/updates - Backup destination before syncing
Mediumaz-storage-blob-deleteaz storage blob delete removes a blob from Azure storage.
Explanation
Deleting a single blob removes it from storage. Without soft delete, the data is permanently lost. Applications expecting this blob will receive 404 errors. Safer alternatives: - az storage blob show: Verify blob before deletion - az storage blob download: Backup content first - Enable soft delete for recovery
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
az-storage-container-listaz-storage-container-showaz-storage-container-existsaz-storage-blob-listaz-storage-blob-showaz-storage-blob-existsaz-storage-blob-downloadaz-storage-blob-download-batchaz-storage-blob-urlaz-storage-blob-metadata-showaz-storage-account-listaz-storage-account-showaz-storage-account-keys-listazcopy-listazcopy-copyazcopy-jobs-listazcopy-jobs-showazcopy-loginazcopy-env