> For the complete documentation index, see [llms.txt](https://docs.stoik.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoik.io/cyber-best-practices/de/leitfaden-zur-behebung-von-schwachstellen/cloud-scan/google-cloud-platform-gcp.md).

# Google Cloud Platform (GCP)

## Öffentlich zugänglicher Cloud-Storage-Bucket

**Schweregrad: Hoch**

### Was das bedeutet

Ein Google Cloud Storage-Bucket ist für das öffentliche Internet zugänglich. Jeder mit der URL kann die Dateien herunterladen. Dies ist eine häufige Ursache für Datenlecks.

### So beheben Sie es

1. Gehen Sie zu [Google Cloud Console](https://console.cloud.google.com) > `Cloud Storage` > `Buckets`.
2. Wählen Sie den Bucket aus.
3. Gehen Sie zum `Berechtigungen` Registerkarte.
4. Entfernen Sie alle Einträge für `allUsers` oder `allAuthenticatedUsers`.
5. Um künftigen öffentlichen Zugriff zu verhindern: Gehen Sie zu den Bucket- `Einstellungen` und aktivieren Sie `Öffentlichen Zugriff verhindern`.

## Verwendete primitive IAM-Rollen

**Schweregrad: Mittel**

### Was das bedeutet

Jemand in Ihrer GCP-Organisation verwendet **primitive Rollen** (Owner, Editor oder Viewer). Diese sind sehr weit gefasst: „Editor“ gewährt beispielsweise Schreibzugriff auf fast alles im Projekt. Google empfiehlt die Verwendung von **vordefinierten Rollen** stattdessen, die nur die jeweils benötigten spezifischen Berechtigungen gewähren.

### So beheben Sie es

1. Gehen Sie zu [Google Cloud Console](https://console.cloud.google.com) > `IAM & Admin` > `IAM`.
2. Identifizieren Sie Nutzer/Servicekonten mit `Owner`, `Editor`, oder `Viewer` Rollen.
3. Ersetzen Sie sie durch spezifischere vordefinierte Rollen (z. B. `roles/storage.admin` anstelle von `Editor`).
4. Verwenden Sie die [IAM Recommender](https://cloud.google.com/iam/docs/recommender-overview) um Vorschläge zur passenden Größenanpassung von Berechtigungen zu erhalten.

## Öffentlicher Cloud SQL-Zugriff

**Schweregrad: Hoch**

### Was das bedeutet

Ihre Cloud SQL-Datenbankinstanz erlaubt Verbindungen von jeder IP-Adresse im Internet (`0.0.0.0/0`). Dadurch wird die Datenbank Brute-Force-Angriffen und der Ausnutzung etwaiger Schwachstellen ausgesetzt.

### So beheben Sie es

1. Gehen Sie zu [Google Cloud Console](https://console.cloud.google.com) > `SQL` > wählen Sie Ihre Instanz aus.
2. Gehen Sie zu `Verbindungen` > `Netzwerk`.
3. Unter `Autorisierte Netzwerke`, entfernen Sie `0.0.0.0/0` oder einen zu weit gefassten CIDR-Bereich.
4. Fügen Sie nur die spezifischen IP-Adressen hinzu, die Zugriff benötigen.
5. Noch besser: Verwenden Sie **Cloud SQL Auth Proxy** oder **Private IP** um eine sichere Verbindung herzustellen, ohne die Instanz öffentlich freizugeben.


---

# 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://docs.stoik.io/cyber-best-practices/de/leitfaden-zur-behebung-von-schwachstellen/cloud-scan/google-cloud-platform-gcp.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.
