gcp-gcf-retrieve-runtime-sa-token
Attacker with execution in the function can mint the runtime SA token.
match
A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.
emit
| source | <principal> |
|---|---|
| target | <runtime service account> |
Narrative
{principal.name}, executing in {function.name}, can retrieve an access token for {sa.name} from the metadata server.
Raw rule rules/derived/gcp/gcf.yaml
id: gcp-gcf-retrieve-runtime-sa-token
emits: CanRetrieveToken
description: Attacker with execution in the function can mint the runtime SA token.
match:
- - principal: null
- CanExecuteAs
- sa: null
emit:
source: <principal>
target: <runtime service account>
permissions: []
narrative: '{principal.name}, executing in {function.name}, can retrieve an access token for {sa.name}
from the metadata server.'