azure-func-masterkey-invoke

derived azure emits CanInvoke

match (effective permission)

{ "action": "Microsoft.Web/sites/hostruntime/host/action", "scope_type": "resource|resourceGroup|subscription" }

emit

source typeIdentity
source<principal>
target<function app>
permissionsMicrosoft.Web/sites/hostruntime/host/action

Narrative

{principal.name} can invoke/update functions of {target.name} via the admin runtime API (hostruntime/host/action).

Raw rule rules/derived/azure/functions.yaml

id: azure-func-masterkey-invoke
emits: CanInvoke
match_effective_permission:
  action: Microsoft.Web/sites/hostruntime/host/action
  scope_type: resource|resourceGroup|subscription
emit:
  source_type: Identity
  source: <principal>
  target: <function app>
  permissions:
  - Microsoft.Web/sites/hostruntime/host/action
  note: Admin runtime API (master-key gated) can update and invoke any function -> completes a code-swap
    escalation.
  narrative: '{principal.name} can invoke/update functions of {target.name} via the admin runtime API
    (hostruntime/host/action).'
move · open · esc close