gcp-gcf-source-code-set

derived gcp emits CanModifyCode

match (effective permission)

{ "action": "cloudfunctions.functions.sourceCodeSet", "resource_type": "google.cloudfunctions.Function" }

emit

source typeIdentity
source<principal>
target<function in scope>
permissionscloudfunctions.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).'
move · open · esc close