> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec2-azure-8.md).

# Azure Storage account container storing activity logs is publicly accessible misconfiguration detect

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC2\_AZURE\_8                    |
| Category - Subcategory | Public Exposure - Storage Buckets    |
| Provider               | AZURE                                |
| Severity               | LOW                                  |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | 499c23da-b67f-441a-81e3-9fc0fd05ea75 |

## Impact

The storage account container containing the activity log export should not be publicly accessible. Allowing public access to activity log content may aid an adversary in identifying weaknesses in the affected account's use or configuration.

Configuring container Access policy to *private* will remove access from the container for everyone except owners of the storage account.

Access policy needs to be set explicitly in order to allow access to other desired users.

## How to Fix

*Resource:* azurerm\_storage\_container, azurerm\_storage\_account, azurerm\_monitor\_activity\_log\_alert

* *Arguments:* container\_access\_type (of *azurerm\_storage\_container)* \[source,go]

***

{ "resource "azurerm\_storage\_container" "ok\_container" { name = "vhds" storage\_account\_name = azurerm\_storage\_account.ok\_account.name

* container\_access\_type = "private" }

resource "azurerm\_storage\_account" "ok\_account" { name = "examplesa" resource\_group\_name = azurerm\_resource\_group.main.name location = azurerm\_resource\_group.main.location account\_tier = "Standard" account\_replication\_type = "GRS" }

resource "azurerm\_monitor\_activity\_log\_alert" "ok\_monitor\_activity\_log\_alert" { name = "example-activitylogalert" resource\_group\_name = azurerm\_resource\_group.main.name scopes = \[azurerm\_resource\_group.main.id] description = "This alert will monitor a specific storage account updates."

criteria { resource\_id = azurerm\_storage\_account.ok\_account.id operation\_name = "Microsoft.Storage/storageAccounts/write" category = "Recommendation" }

action { action\_group\_id = azurerm\_monitor\_action\_group.main.id

webhook\_properties = { from = "terraform" }

} }

## ", }


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec2-azure-8.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
