Repository navigation
bug(misconf): AZU-0056 false positive when blob soft delete is configured as a nested ARM blobServices resource #11559
Closed
ankur-kapoor-uk
started this conversation in
Bugs
Replies: 1 comment
|
Hi @ankur-kapoor-uk , thanks for the report! Track #11566 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
Summary
Trivy reports AZU-0056 ("Storage account should have blob soft delete enabled")
for an ARM template that enables seven-day blob soft delete through a nested
Microsoft.Storage/storageAccounts/blobServices resource.
Azure's management API confirms that soft delete is enabled on the deployed
blob service. This appears to be an ARM adapter recognition issue rather than
a missing control.
Desired Behavior
Trivy should recognize the nested
blobServices/defaultresource and notreport AZU-0056 when blob soft delete is enabled with positive retention.
Disabling or removing the policy should still produce the finding.
Actual Behavior
On the original equivalent template, Trivy reports:
AZU-0056 (MEDIUM): Storage account should have blob soft delete enabled
Storage account does not have blob soft delete enabled.
The deployed blob service returns:
{ "deleteRetentionPolicy": { "enabled": true, "days": 7, "allowPermanentDelete": false } }Reproduction Steps
Minimal ARM example
Save as
repro/storage.json:{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"name": "softdeleterepro123",
"location": "uksouth",
"kind": "StorageV2",
"sku": {
"name": "Standard_LRS"
},
"properties": {
"supportsHttpsTrafficOnly": true,
"minimumTlsVersion": "TLS1_2",
"allowBlobPublicAccess": false
},
"resources": [
{
"type": "blobServices",
"apiVersion": "2019-06-01",
"name": "default",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', 'softdeleterepro123')]"
],
"properties": {
"deleteRetentionPolicy": {
"enabled": true,
"days": 7
}
}
}
]
}
]
}
Steps to reproduce
Inspect the results for AZU-0056 / AVD-AZU-0056.
Other findings from this deliberately minimal template are outside this report.
Operating System
Linux — running Trivy in a container on an Azure DevOps agent
Version
Checklist
trivy clean --allAll reactions