Azure ACR admin account is enabled misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_AZURE_137
Category - Subcategory
IAM - Overly Permissive
Provider
AZURE
Severity
LOW
Framework
ARM, Bicep, Terraform, Terraform Plan
Impact
This rule checks to ensure that the admin account for Azure Container Registry (ACR) is disabled. The admin account is a legacy authentication method and it provides full permissions to the entire ACR. This is a potential security risk as if the admin account credentials are compromised, it can lead to unauthorized access and manipulation of the container images and repositories. Hence, it is recommended to disable the ACR admin account and use individual Azure AD identities for authentication for greater security control.
How to Fix
To fix the rule violation, we need to explicitly disable the admin user in your Azure ACR settings like so:
In the above code, the "admin_enabled" property is explicitly set to False. This is secure because it disables the creation of an admin account, which is a highly privileged role that's often subject to attacks. Disabling this ensures that the access is limited, improving the security of this resource. [source,go]
resource "azurerm_container_registry" "example" { name = "example" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location sku = "standard" admin_enabled = false }
Last updated
Was this helpful?
