azure-storage-blob-data-contributor-write-container-scope

Storage Blob Data Contributor/Owner at container scope grants blob write access to that specific container.

derived azure emits CanWriteData

match

A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.

{'principal': None} HasPermission {'container': None}

where

node_class(?container) == Storage and node_type(?container) == ObjectStorage node_type(?container) matched provider_type == 'Microsoft.Storage/storageAccounts/blobServices/containers' ?principal has EFFECTIVE dataAction Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write at ?container scope (Storage Blob Data Contributor ba92f5b4 or Storage Blob Data Owner b7e6dc6d)

emit

source typeIdentity
target typeObjectStorage
source?principal
target?container
permissionsMicrosoft.Storage/storageAccounts/blobServices/containers/blobs/write
conditionsiam_permission network_reachability
state logicif networkAcls.defaultAction == Deny AND caller has no allowed network path or PE: CONDITIONAL(network_reachability); elif deny assignment covers blobs/write at effective scope: BLOCKED; else ACTIVE.

Narrative

{principal.name} can write to blob container {container.name} (Storage Blob Data Contributor or Owner at container scope), enabling overwrite of config files or artifacts within this specific container consumed by downstream compute services.

Raw rule rules/derived/azure/storage.yaml

id: azure-storage-blob-data-contributor-write-container-scope
emits: CanWriteData
description: Storage Blob Data Contributor/Owner at container scope grants blob write access to that specific
  container.
match:
- - principal: null
  - HasPermission
  - container: null
where:
- node_class(?container) == Storage and node_type(?container) == ObjectStorage
- node_type(?container) matched provider_type == 'Microsoft.Storage/storageAccounts/blobServices/containers'
- ?principal has EFFECTIVE dataAction Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write
  at ?container scope (Storage Blob Data Contributor ba92f5b4 or Storage Blob Data Owner b7e6dc6d)
emit:
  source_type: Identity
  target_type: ObjectStorage
  source: ?principal
  target: ?container
  permissions:
  - Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write
  conditions:
  - iam_permission
  - network_reachability
  state_logic: 'if networkAcls.defaultAction == Deny AND caller has no allowed network path or PE: CONDITIONAL(network_reachability);
    elif deny assignment covers blobs/write at effective scope: BLOCKED; else ACTIVE.'
  confidence: '0.87'
  derived_from:
  - rule_id: azure-storage-blob-write-permission
    binding: ?principal HasPermission ?container
  false_positive_note: This rule fires on container-scoped grants only (RBAC assigned at the container
    node, not the account). The target is the specific container, not the account. Immutability policies
    block writes when the container has properties.hasImmutabilityPolicy == true or a locked retention
    policy. Network gate applies. See azure-storage-blob-data-contributor-write-account-scope for account-scoped
    grants.
  narrative: '{principal.name} can write to blob container {container.name} (Storage Blob Data Contributor
    or Owner at container scope), enabling overwrite of config files or artifacts within this specific
    container consumed by downstream compute services.'
move · open · esc close