azure-aci-imds-exposescred
A container group with a bound managed identity leaks that MI's credential to any in-container code via the local IMDS/IDENTITY_ENDPOINT - the credential-leak fact paired with azure-aci-imds-token.
match
A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.
emit
| source | <containerGroup> |
|---|---|
| target | <managed identity bound to the group> |
Narrative
Container group {group.name} exposes the credential of its managed identity {mi.name} to any code running inside it (IMDS / IDENTITY_ENDPOINT).
Raw rule rules/derived/azure/aci.yaml
id: azure-aci-imds-exposescred
emits: ExposesCredential
description: "A container group with a bound managed identity leaks that MI's credential to any in-container\
\ code via the local IMDS/IDENTITY_ENDPOINT \u2014 the credential-leak fact paired with azure-aci-imds-token."
match:
- - group: null
- ExecutesAs
- mi: null
emit:
source: <containerGroup>
target: <managed identity bound to the group>
permissions: []
note: 'Companion to azure-aci-imds-token: same match [?group, ExecutesAs, ?mi]. CanRetrieveToken models
the token-mint capability; ExposesCredential models the leak fact (source Compute -> target Identity,
both schema-valid).'
false_positive_note: Only fires when the group actually has a managed identity (identity.type != None).
No MI => no exposure; do NOT emit.
narrative: Container group {group.name} exposes the credential of its managed identity {mi.name} to
any code running inside it (IMDS / IDENTITY_ENDPOINT).