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