azure-func-contributor

derived azure emits CanAdminister

match (effective permission)

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

where

principal effectively holds Website Contributor / Contributor / Owner (or custom role granting Microsoft.Web/sites/*) at the scope

emit

source typeIdentity
target type*
source<principal>
target<function app (Microsoft.Web/sites) in scope>
permissionsMicrosoft.Web/sites/write

Narrative

{principal.name} has full control of Function app {target.name} (Microsoft.Web/sites/*).

Raw rule rules/derived/azure/functions.yaml

id: azure-func-contributor
emits: CanAdminister
match_effective_permission:
  action: Microsoft.Web/sites/write
  scope_type: resource|resourceGroup|subscription
where:
- principal effectively holds Website Contributor / Contributor / Owner (or custom role granting Microsoft.Web/sites/*)
  at the scope
emit:
  source_type: Identity
  target_type: '*'
  source: <principal>
  target: <function app (Microsoft.Web/sites) in scope>
  permissions:
  - Microsoft.Web/sites/write
  false_positive_note: Microsoft.Web/sites/* grants full control of the site object but NOT Microsoft.Authorization/*/write;
    escalation is via the app's managed identity, not self role-assignment. Still sufficient for code
    execution.
  narrative: '{principal.name} has full control of Function app {target.name} (Microsoft.Web/sites/*).'
move · open · esc close