azure-func-extensions-write

derived azure emits CanModifyCode

match (effective permission)

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

emit

source typeIdentity
source<principal>
target<function app>
permissionsMicrosoft.Web/sites/extensions/write
conditionsservice_state

Narrative

{principal.name} can deploy arbitrary code to {target.name} via the Kudu extensions API (extensions/write).

Raw rule rules/derived/azure/functions.yaml

id: azure-func-extensions-write
emits: CanModifyCode
match_effective_permission:
  action: Microsoft.Web/sites/extensions/write
  scope_type: resource|resourceGroup|subscription
emit:
  source_type: Identity
  source: <principal>
  target: <function app>
  permissions:
  - Microsoft.Web/sites/extensions/write
  conditions:
  - service_state
  escalation: Use the Kudu/SCM ZipDeploy / VFS write API to deploy a new package or write files into the
    container.
  false_positive_note: This is the SCM extensions API; if SCM basic auth is disabled it still works via
    AAD/ARM. Code runs on next invoke/restart -> CONDITIONAL(trigger_exists) absent a trigger.
  narrative: '{principal.name} can deploy arbitrary code to {target.name} via the Kudu extensions API
    (extensions/write).'
move · open · esc close