For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/ansible-azure-default-azure-storage-account-network-access-is-too-permissive.md.
A documentation index is available at /llms.txt.
Storage accounts must not permit broad public access or use a permissive default ACL. Public network access or a default-allow policy can expose blobs, queues, and file storage to unauthorized users, increasing the risk of data exfiltration.
For Ansible resources using azure.azcollection.azure_rm_storageaccount or azure_rm_storageaccount, explicitly set public_network_access to Disabled and set network_acls.default_action to Deny. Resources that omit public_network_access (the default is Enabled), that set public_network_access: Enabled, or that set network_acls.default_action: Allow are flagged.
---- name:create an accountazure.azcollection.azure_rm_storageaccount:resource_group:myResourceGroupname:clh0002type:Standard_RAGRStags:testing:testingdelete:on-exitnetwork_acls:default_action:Deny
---- name:create an accountazure.azcollection.azure_rm_storageaccount:resource_group:myResourceGroupname:clh0002type:Standard_RAGRStags:testing:testingdelete:on-exitpublic_network_access:Disabled
Non-Compliant Code Examples
---- name:create an accountazure.azcollection.azure_rm_storageaccount:resource_group:myResourceGroupname:clh0002type:Standard_RAGRStags:testing:testingdelete:on-exitpublic_network_access:Enabled
---- name:create an accountazure.azcollection.azure_rm_storageaccount:resource_group:myResourceGroupname:clh0002type:Standard_RAGRStags:testing:testingdelete:on-exit
---- name:create an accountazure.azcollection.azure_rm_storageaccount:resource_group:myResourceGroupname:clh0002type:Standard_RAGRStags:testing:testingdelete:on-exitnetwork_acls:default_action:Allow
1
2
rulesets:- Ansible / Azure # Rules to enforce / Azure.
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.