# GCP - Cloud Build Post Exploitation

{{#include ../../../banners/hacktricks-training.md}}

## Cloud Build

Cloud Build の詳細については、次を参照してください：

{{#ref}}
../gcp-services/gcp-cloud-build-enum.md
{{#endref}}

### `cloudbuild.builds.approve`

この権限があれば、**codebuild that require approvals** の実行を承認できます。

<details>

<summary>Cloud Build の実行を承認</summary>
```bash
# Check the REST API in https://cloud.google.com/build/docs/api/reference/rest/v1/projects.locations.builds/approve
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{{
"approvalResult": {
object (ApprovalResult)
}}' \
"https://cloudbuild.googleapis.com/v1/projects/<PROJECT_ID>/locations/<LOCATION>/builds/<BUILD_ID>:approve"
```
</details>

{{#include ../../../banners/hacktricks-training.md}}
