gcp-gcf-source-code-set
match (effective permission)
{
"action": "cloudfunctions.functions.sourceCodeSet",
"resource_type": "google.cloudfunctions.Function"
}
emit
| source type | Identity |
|---|---|
| source | <principal> |
| target | <function in scope> |
| permissions | cloudfunctions.functions.sourceCodeSet cloudfunctions.functions.update |
Narrative
{principal.name} can replace the source of {function.name} (cloudfunctions.functions.sourceCodeSet).
Raw rule rules/derived/gcp/gcf.yaml
id: gcp-gcf-source-code-set
emits: CanModifyCode
match_effective_permission:
action: cloudfunctions.functions.sourceCodeSet
resource_type: google.cloudfunctions.Function
alt_permission: cloudfunctions.functions.update
emit:
source_type: Identity
source: <principal>
target: <function in scope>
permissions:
- cloudfunctions.functions.sourceCodeSet
- cloudfunctions.functions.update
escalation: Replace deployed source, then trigger/invoke to run code as the runtime SA.
narrative: '{principal.name} can replace the source of {function.name} (cloudfunctions.functions.sourceCodeSet).'