More Info:
Allowing public access to activity log content may aid an adversary in identifying weaknesses in the affected account’s use or configuration.Risk Level
LowAddress
Security, Operational MaturityCompliance Standards
CISAZURE, CBP, HITRUSTTriage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration in Azure, you can follow these steps:
- Open the Azure portal and navigate to the storage account that contains the container with the logs.
- Click on the “Containers” tab on the left-hand side of the screen.
- Select the container that contains the logs.
- Click on the “Access policy” tab on the top of the screen.
- Under the “Public access level” section, select “Private (no anonymous access)”.
- Click on the “Save” button at the top of the screen to save the changes.
- Verify that the container is no longer publicly accessible by trying to access it from a different browser or device.
Using CLI
Using CLI
To remediate the issue of a publicly accessible Storage Account container containing logs in Azure, you can follow the steps below using Azure CLI:
-
Log in to your Azure account using the Azure CLI command
az login. -
Once you have successfully logged in, you can list all the storage accounts in your subscription using the command
az storage account list. -
Identify the storage account that contains the publicly accessible container and copy its
resource groupandname. -
Use the following command to update the access level of the container to private:
az storage container set-permission --account-name <storage_account_name> --account-key <storage_account_key> --name <container_name> --public-access offReplace<storage_account_name>with the name of the storage account,<storage_account_key>with the account key of the storage account, and<container_name>with the name of the container that contains the logs. -
Verify that the access level of the container has been updated to private by running the command
az storage container show --account-name <storage_account_name> --account-key <storage_account_key> --name <container_name>. If the access level is set toprivate, you have successfully remediated the issue.
Using Python
Using Python
To remediate the misconfiguration in Azure using Python, you can follow these steps:This will ensure that the Storage Account container containing the logs is not publicly accessible.
- Import the required modules:
- Connect to the Azure Storage Account using the connection string:
- Get the container name that contains the logs:
- Set the PublicAccess level to ‘None’:
- Verify that the PublicAccess level has been set to ‘None’:

