> 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/iam/appsec-gcp-116.md).

# Basic roles used at the folder level misconfiguration detected in code

## Rule Details

|                        |                           |
| ---------------------- | ------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_GCP\_116          |
| Category - Subcategory | IAM - Overly Permissive   |
| Provider               | GCP                       |
| Severity               | MEDIUM                    |
| Framework              | Terraform, Terraform Plan |

## Impact

This rule is checking for the use of basic roles at the folder level within Google Cloud Platform (GCP). Basic roles include primitive roles (Owner, Editor, Viewer) and predefined roles that have a wide range of permissions. Using these basic roles at the folder level can be a security risk as it might grant more permissions than necessary to users or services, violating the principle of least privilege. Accessibility or modification of sensitive data beyond what's required can lead to data breaches or unwanted changes. Therefore, it's recommended to grant only specific, necessary permissions to users or services.

## How to Fix

*Resource:* 'google\_folder\_iam\_member', 'google\_folder\_iam\_binding'

Apply the principle of least privilege. Always provide only the level of access necessary to the services your applications need, no more and no less.

This provides the user '<jane@example.com>' with the 'Monitoring editor' role. This is one step up from 'basic roles', and is expected to be secure enough as per the policy because it restricts the broad access provided by basic roles.

## Avoid running basic roles at folder level, like 'roles/editor', 'roles/viewer' or 'roles/owner'. These roles are legacy and over-grant permissions. In contrast, predefined roles offer more granular access control to resources. \[source,go]

resource "google\_folder\_iam\_binding" "folder\_iam\_binding" { members = \[ "user:<jane@example.com>", ]

## role = "roles/monitoring.editor" }


---

# 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/iam/appsec-gcp-116.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.
