> 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/storage/appsec2-oci-4.md).

# OCI File Storage File System access is not restricted to root users misconfiguration detected in cod

## Rule Details

|                        |                                   |
| ---------------------- | --------------------------------- |
| Cortex AppSec Rule ID  | APPSEC2\_OCI\_4                   |
| Category - Subcategory | Public Exposure - Storage Buckets |
| Provider               | ORACLE                            |
| Severity               | MEDIUM                            |
| Framework              | Terraform, Terraform Plan         |

## Impact

This rule is checking to ensure that access to the File Storage File System is restricted to root users only. Granting unrestricted access or non-root user access to a File Storage File System can lead to threats like unauthorized access, data leakage, and potential modifications to critical files, which in turn can disrupt system processes and compromise data integrity and security.

## How to Fix

*Resource:* oci\_file\_storage\_export

* *Arguments:* export\_options.identity\_squash

## To fix this rule, you need to set the `identity_squash` attribute to `ROOT` in the "oci\_file\_storage\_export" resource. \[source,go]

resource "oci\_file\_storage\_export" "fail\_1" { export\_set\_id = oci\_file\_storage\_export\_set.fss\_pud\_export\_set.id file\_system\_id = oci\_file\_storage\_file\_system.fss\_pud\_file\_system.id path = var.export\_path\_fss\_pud

## export\_options { source = var.pud\_subnet\_cidr\_block access = "READ\_WRITE" identity\_squash = "ROOT" require\_privileged\_source\_port = true } export\_options { source = var.pud\_web\_subnet\_cidr\_block access = "READ\_WRITE" identity\_squash = "NONE" require\_privileged\_source\_port = true } }


---

# 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/storage/appsec2-oci-4.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.
