> 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/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-cloud-run-service-revision-is-using-default-service-account-with-editor-role.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP Cloud Run service revision is using default service account with editor role

### Synopsis

| Field               | Value                                                                            |
| ------------------- | -------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                        |
| Finding Type        | GCP Cloud Run service revision is using default service account with editor role |
| Finding ID          | 60000912                                                                         |
| Generates a Finding | This detection rule also generates a finding                                     |
| Severity            | Medium                                                                           |
| Category            | CONFIGURATION                                                                    |
| Cloud Providers     | GCP                                                                              |
| Platform Module     | CSPM                                                                             |
| Asset Types         | GOOGLE\_CLOUD\_IAM\_MEMBER                                                       |

### Description

Cloud Run service revisions using the default service account with the 'editor' role present a significant security risk. This misconfiguration allows the service revision excessive privileges, potentially leading to data breaches or unauthorized resource modification.

The default service account in Google Cloud Platform (GCP) is automatically created and assigned the 'editor' role by default for Cloud Run unless explicitly changed. This broad access enables the service revision to perform actions beyond its operational needs. Attackers exploiting this could escalate privileges and compromise the entire GCP environment.

The impact of this misconfiguration includes data exfiltration, unauthorized resource modification, and potentially complete system compromise. Restricting access to only necessary permissions significantly reduces the attack surface and improves the overall security posture. Following the principle of least privilege is crucial for robust cloud security.

To mitigate this, explicitly grant only the necessary permissions to the service account used by Cloud Run service revisions. Create a dedicated service account with a custom role defining only the required permissions. Regularly review and audit service account permissions to ensure adherence to the principle of least privilege.

### Remediation

Changing a service account of an existing cloud run service revision is impossible. The service revision can be deleted and a new revision with appropriate permissions can be deployed.

To delete a cloud run service revision that is serving traffic, please refer to the steps below:

1. Login to the GCP console
2. Navigate to the 'Cloud Run' service
3. Click on the cloud run service on whose revision, alert is generated
4. Go to the 'REVISIONS' tab
5. Click on 'MANAGE TRAFFIC'
6. Click on the delete icon in front of the alerting revision. Adjust traffic distribution appropriately.
7. Click on 'Save'
8. Under the 'REVISIONS' tab, click the actions button (three dots) in front of the alerting revision.
9. Click 'Delete'
10. Click 'DELETE'

To delete a cloud run service revision that is not serving any traffic, please refer to the steps below:

1. Login to the GCP console
2. Navigate to the 'Cloud Run' service
3. Click on the cloud run service on whose revision, alert is generated
4. Go to the 'REVISIONS' tab
5. Under the 'REVISIONS' tab, click the actions button (three dots) in front of the alerting revision.
6. Click 'Delete'
7. Click 'DELETE'


---

# 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/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-cloud-run-service-revision-is-using-default-service-account-with-editor-role.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.
