> 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/networking/appsec-azure-248.md).

# Azure Batch Account configured with overly permissive network access misconfiguration detected in co

## Rule Details

|                       |                                       |
| --------------------- | ------------------------------------- |
| Cortex AppSec Rule ID | APPSEC\_AZURE\_248                    |
| Category              | Networking                            |
| Provider              | AZURE                                 |
| Severity              | HIGH                                  |
| Framework             | ARM, Bicep, Terraform, Terraform Plan |
| Mapped CSPM/KSPM Rule | 5e1ba43e-121a-4e71-b5e6-d8f8091fe7cd  |

## Impact

Azure Batch Accounts with unrestricted network access are vulnerable to unauthorized access and compromise. Publicly accessible Batch Accounts allow any entity to connect and potentially execute malicious code or exfiltrate data.

Azure Batch Accounts misconfiguration exposes the account to attacks from untrusted IPs. Malicious actors could exploit this open access to deploy malware, access sensitive data, or perform denial-of-service attacks. Restricting access mitigates these risks significantly.

The impact of this misconfiguration could include data breaches, unauthorized resource consumption, and service disruptions. Enforcing restricted network access ensures only authorized entities can interact with the Batch Account, enhancing security posture and reducing the attack surface.

Implement network restrictions using either an IP firewall to allow only specific IP addresses or address ranges, or by integrating with a Virtual Network for enhanced security. Regularly review and update these allowed IP addresses and Virtual Network configurations to maintain optimal security.

## How to Fix

## Ensure your Azure Batch account does not have public network access enabled by setting `publicNetworkAccess` to disabled and do not set `defaultAction` to allow. \[source,go]

{ ... "resources": \[ { "type": "Microsoft.Batch/batchAccounts", "apiVersion": "2024-02-01", "name": "example", "properties": {

* ```
     "publicNetworkAccess": "Enabled",
    "networkProfile": {
      "accountAccess": {
  ```
* ```
         "defaultAction": "Allow"
      }
    }
  }
  ```

  } ] }

***


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/networking/appsec-azure-248.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
