> 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/appsec-openstack-2.md).

# OpenStack Security groups allow ingress from 0.0.0.0:0 to port 22 (tcp / udp) misconfiguration detec

## Rule Details

|                        |                                   |
| ---------------------- | --------------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_OPENSTACK\_2              |
| Category - Subcategory | Public Exposure - Sensitive Ports |
| Provider               | OTHER                             |
| Severity               | LOW                               |
| Framework              | Terraform, Terraform Plan         |

## Impact

Allowing unrestricted ingress access on port 22 (SSH) in OpenStack security groups exposes instances to potential unauthorized access and brute force attacks. SSH is a common target for attack due to its widespread use and access to shell on the instance. Restricting access to known IP addresses or IP ranges helps mitigate this risk by limiting who can attempt to connect to instances via SSH. This rule checks for OpenStack security groups that allow unrestricted ingress on port 22 and fails if any are found, encouraging the practice of least privilege access.

## How to Fix

*Resource:* openstack\_networking\_secgroup\_rule\_v2

Ensure that the security group rule for SSH (port 22) ingress does not allow access from '0.0.0.0/0' (all IP addresses).

## By specifying a known IP range for SSH access, this configuration adheres to best practices for securing SSH access, reducing the risk of unauthorized access to instances. \[source,go]

resource "openstack\_compute\_secgroup\_v2" "secgroup\_1" { name = "my\_secgroup" description = "my security group"

rule { from\_port = 22 to\_port = 22 ip\_protocol = "tcp"

* cidr = "192.168.0.0/16" } }

***


---

# 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/public-exposure/appsec-openstack-2.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.
