gcp-gcf-set-iam-policy
match (effective permission)
{
"action": "cloudfunctions.functions.setIamPolicy",
"resource_type": "google.cloudfunctions.Function"
}
emit
| source type | Identity |
|---|---|
| target type | * |
| source | <principal> |
| target | <function allow policy in scope> |
| permissions | cloudfunctions.functions.setIamPolicy |
Narrative
{principal.name} can set the IAM policy of {function.name} (cloudfunctions.functions.setIamPolicy) and grant itself invoke.
Raw rule rules/derived/gcp/gcf.yaml
id: gcp-gcf-set-iam-policy
emits: CanModifyPolicy
match_effective_permission:
action: cloudfunctions.functions.setIamPolicy
resource_type: google.cloudfunctions.Function
emit:
source_type: Identity
target_type: '*'
source: <principal>
target: <function allow policy in scope>
permissions:
- cloudfunctions.functions.setIamPolicy
escalation: Grant self roles/cloudfunctions.invoker (or run.invoker for 2nd gen) to complete a code/config
escalation.
narrative: '{principal.name} can set the IAM policy of {function.name} (cloudfunctions.functions.setIamPolicy)
and grant itself invoke.'