latest run 54 pass 0 fail 0 skipevidence →
HKB Operations: pages
HKB OperationsKnowledge space

Starred pages

Pages

Page directory · Labels · [ hides this

GR-06

stateful resources keep their data. Retain on delete and replace; symmetric KMS keys rotate.

Property Value
Runs on Every CloudFormation template, in CI on each change and in the pipeline's Validate stage
Source guard/rules/gr-06-stateful-retain.guard
Exceptions none

Rule text

# GR-06: stateful resources keep their data. Retain on delete and replace; symmetric KMS keys rotate.
# Asymmetric keys cannot rotate automatically: record the exception in guard/exceptions.yaml (DNSSEC KSK, D51).
let stateful = Resources.*[ Type in ['AWS::S3::Bucket', 'AWS::KMS::Key', 'AWS::DynamoDB::Table'] ]
let sym_keys = Resources.*[ Type == 'AWS::KMS::Key'
  Properties.KeySpec not exists or Properties.KeySpec == 'SYMMETRIC_DEFAULT' ]

rule GR_06_retain when %stateful !empty {
  %stateful {
    DeletionPolicy == 'Retain'     <<GR-06: DeletionPolicy must be Retain>>
    UpdateReplacePolicy == 'Retain' <<GR-06: UpdateReplacePolicy must be Retain>>
  }
}

rule GR_06_rotation when %sym_keys !empty {
  %sym_keys { Properties.EnableKeyRotation == true <<GR-06: symmetric KMS keys must enable rotation>> }
}

Page information

Owner
Security Engineering
Status
current Current: generated from the templates and records in the repository at this build.
Generated from
guard/rules/gr-06-stateful-retain.guard
Linked from
Controls, Template rules
Plain markdown
/wiki/guard/gr-06/index.md