gcp-kms-has-policy

explicit gcp emits HasPolicy

match (record)

{ "field": "iamPolicy.bindings", "resource_type": "google.cloud.kms.CryptoKey" }

emit

source type*
target typePolicy
source<CryptoKey node>
target<CryptoKey ResourcePolicy node>

Narrative

{key.name} has an IAM allow policy governing who may use/manage it.

Raw rule rules/explicit/gcp-kms.yaml

id: gcp-kms-has-policy
emits: HasPolicy
applies_to:
- gcp
match_record:
  resource_type: google.cloud.kms.CryptoKey
  field: iamPolicy.bindings
emit:
  source_type: '*'
  target_type: Policy
  source: <CryptoKey node>
  target: <CryptoKey ResourcePolicy node>
  api_source: cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy
  evidence_field: iamPolicy.bindings
  narrative: '{key.name} has an IAM allow policy governing who may use/manage it.'
move · open · esc close